From the course: Learning PowerShell Core
Install Powershell Core on Linux - PowerShell Tutorial
From the course: Learning PowerShell Core
Install Powershell Core on Linux
- [Instructor] I'm now on my Ubuntu Linux VM, and I'd like to get Powershell Core installed. To do that, I'm going to use the apt-get utility. And the first thing you have to do whenever you use the apt-get utility is first make sure the apt-get database is updated. This is to ensure that we are able to download the latest version of PowerShell Core. So I'll go ahead and do that now and then notice that it runs through some reading some package lists. And then we're all ready to go. We should be able to pull down the latest version of PowerShell Core. The next thing we have to do is use Wget to go out to the packages.microsoft.com URL address as you see here and pull down the correct version for the version of UBUNTU that I'm running here. So you notice that I am running UBUNTU18.0.4 and I'm pulling down Debian-based package because UBUNTU is Debian based. So this will change up depending on what version of Linux that you are using. Once I have downloaded that, I then need to unpack it. I would use the DPKG utility here to unpack that Debian package. All right, now that the package is unpacked, I could then install it, using that again, I can use the apt-get install command here -Y to provide the package name of PowerShell. And you can see that the PowerShell package has a few different dependencies, all of those dependencies are taken care of with apt-get inside of there. And at this time, we are installing PowerShell 6.2.2. For UBUNTU, you'll see some information scrolling through the screen here. And after that, that's it. That's everything there is to installing PowerShell Core on UBUNTU in this instance. So now can do is, we can run PowerShell. So right now I'm in Bash. We can run PowerShell by typing pwsh. And now we are in a PowerShell prompt. To check and see what version we're running, we can use the PS version automatic variable. And now you can see that the PS version is 6.2.2. We've successfully installed PowerShell Core on UBUNTU.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.