Tuesday, April 21, 2020

Install powershell 7 on Debian 10

See the version of Debian

lsb_release -a

First I need to access all the commands stored in /usr/local/sbin and /usr/sbin

I need to edit the .bashrc file in my user's home profile and the last two lines at the end

export PATH=$PATH:/usr/local/sbin
export PATH=$PATH:/usr/sbin



save the file 


and 

Source .bashrc

to reload the file to see the change


to use the old ifconfig

sudo apt install net-tools



to see the dynamically generated ip 

ifconfig

I enabled ssh while installing so now using tool like putty I can access debian from outside

Now let me install cshell zshell and korshell

 sudo apt install csh zsh ksh

Now I am using Debian 10 which I can verify by using  lsb_release -a command

So to install powershell I have to use these commands



# Download the Microsoft repository GPG keys
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb

# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb

# Update the list of products
sudo apt-get update

# Install PowerShell
sudo apt-get install -y powershell

# Start PowerShell
pwsh





Source:https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7



No comments:

Post a Comment