Recall & Review
beginner
What is PowerShell on Linux?
PowerShell on Linux is a cross-platform command-line shell and scripting language that works on Linux, macOS, and Windows. It lets you automate tasks and manage systems using the same commands and scripts across different operating systems.
Click to reveal answer
beginner
How do you install PowerShell on a Linux system like Ubuntu?
You can install PowerShell on Ubuntu by running these commands:<br>
sudo apt update<br>sudo apt install -y wget apt-transport-https software-properties-common<br>wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb<br>sudo dpkg -i packages-microsoft-prod.deb<br>sudo apt update<br>sudo apt install -y powershell<br>Then start PowerShell by typing
pwsh.Click to reveal answer
beginner
How do you start PowerShell on Linux after installation?
Open your terminal and type
pwsh then press Enter. This launches the PowerShell shell where you can run PowerShell commands and scripts.Click to reveal answer
intermediate
Can PowerShell scripts written on Windows run on Linux without changes?
Most PowerShell scripts run on Linux without changes because PowerShell is cross-platform. However, scripts that use Windows-specific features like Windows Registry or Windows-only cmdlets may need adjustments.
Click to reveal answer
beginner
What is a simple PowerShell command to list files in the current directory on Linux?
Use
Get-ChildItem or its alias ls to list files and folders in the current directory. For example:<br>Get-ChildItem<br>This works similarly on Linux and Windows.
Click to reveal answer
Which command starts PowerShell on a Linux terminal?
✗ Incorrect
On Linux, PowerShell is started by typing 'pwsh' in the terminal.
What package manager command is used to install PowerShell on Ubuntu?
✗ Incorrect
Ubuntu uses 'apt' as its package manager, so 'apt install powershell' installs PowerShell.
Which of these is a PowerShell cmdlet to list directory contents?
✗ Incorrect
'Get-ChildItem' is the PowerShell cmdlet to list files and folders.
True or False: PowerShell on Linux supports Windows Registry commands.
✗ Incorrect
Windows Registry is a Windows-only feature and is not supported on Linux PowerShell.
What is the main benefit of PowerShell being cross-platform?
✗ Incorrect
Cross-platform means you can run the same PowerShell scripts on different operating systems.
Explain how to install and start PowerShell on a Linux system.
Think about the commands you run in the terminal step by step.
You got /5 concepts.
Describe the advantages and limitations of using PowerShell on Linux compared to Windows.
Consider what works the same and what might be different.
You got /4 concepts.