Displaying items by tag: PowerShell

    Installing and configuring PowerShell on Ubuntu Linux

    Download Powershell package from https://github.com/PowerShell/PowerShell/. Download a suitable version depending on the version of the Operating System you have. Here I am showing the procedure for Ubuntu Server 16.04. Below is the process for installing and configuring PowerShell on Ubuntu Linux.

    Run the following command to download Powershell Package for Ubuntu 16.04 .

    wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.17/powershell_6.0.0-alpha.17-1ubuntu1.16.04.1_amd64.deb

    081420 2006 Installinga1

    Then execute the following in terminal.

    sudo dpkg -i powershell_6.0.0-alpha.17-1ubuntu1.16.04.1_amd64.deb

    sudo apt-get install -f

    081420 2006 Installinga2

    Powershell is installed on Ubuntu now. This is time to test the powershell on Ubuntu Linux. Let us run some commands.

    Enter powershell in the terminal to start Powershell.

    Enter the following in powershell console.

    081420 2006 Installinga3

    $PSVersionTable

    The output should be something like the following.

    081420 2006 Installinga4 

    The following is a brief listing of the common Cmd.exe and UNIX commands that you can use inside Windows PowerShell:

           

    cat

    dir

    mount

    rm

    cd

    echo

    move

    rmdir

    chdir

    erase

    popd

    sleep

    clear

    h

    ps

    sort

    cls

    history

    pushd

    tee

    copy

    kill

    pwd

    type

    del

    lp

    r

    write

    diff

    ls

    ren

     

    However, all the PowerShell commands are not available on Linux PowerShell. For further reference please check at https://docs.microsoft.com/en-us/powershell/scripting/whats-new/known-issues-ps6?view=powershell-7 : (Known Issues for PowerShell on Non-Windows Platforms)

    Published in PowerShell
    Tagged under
    © 2021 WinAdmin.org. All Rights Reserved.