最后活跃于 1720182742

jh's Avatar jh 修订了这个 Gist 1720182742. 转到此修订

1 file changed, 31 insertions

pwsh.sh(文件已创建)

@@ -0,0 +1,31 @@
1 + #!/bin/bash
2 + ###################################
3 + # Prerequisites
4 +
5 + # Update the list of packages
6 + sudo apt-get update
7 +
8 + # Install pre-requisite packages.
9 + sudo apt-get install -y wget apt-transport-https software-properties-common
10 +
11 + # Get the version of Ubuntu
12 + source /etc/os-release
13 +
14 + # Download the Microsoft repository keys
15 + wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
16 +
17 + # Register the Microsoft repository keys
18 + sudo dpkg -i packages-microsoft-prod.deb
19 +
20 + # Delete the Microsoft repository keys file
21 + rm packages-microsoft-prod.deb
22 +
23 + # Update the list of packages after we added packages.microsoft.com
24 + sudo apt-get update
25 +
26 + ###################################
27 + # Install PowerShell
28 + sudo apt-get install -y powershell
29 +
30 + # Start PowerShell
31 + pwsh
上一页 下一页