0698.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Install PowerShell on Debian/Ubuntu</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Install Guide,PowerShell,Scripting,Debian,Linux,How To Install PowerShell On Linux,How To Install PowerShell On Debian,PowerShell Scripting,PowerShell On Linux,PowerShell On Debian,Microsoft,System Administration,Terminal,Command Line,CLI,Microsoft PowerShell,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Install PowerShell on Debian/Ubuntu">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="05/13/2022 01:46:22 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Install PowerShell on Debian/Ubuntu</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is PowerShell?</h2>
  26. <blockquote><em>PowerShell is a cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework. PowerShell runs on Windows, Linux, and macOS. -<a href="https://docs.microsoft.com/en-us/powershell/scripting/overview" target="_blank">https://docs.microsoft.com/en-us/powershell/scripting/overview</a></em></blockquote>
  27. <ol>
  28. <li>Log into the Linux device</li>
  29. <li>Run the following commands in a terminal window
  30. <div class="codeBlock"># update software repositories<br />
  31. sudo apt update<br />
  32. # install available software updates<br />
  33. sudo apt upgrade -y<br />
  34. # lookup latest release URL<br />
  35. regex=&#39;&quot;browser_download_url&quot;: &quot;(https:\/\/github.com\/PowerShell\/PowerShell\/releases\/download\/[^/]*\/powershell_[^/]*.deb_amd64\.deb)&quot;&#39; &amp;&amp; response=$(curl -H &quot;Accept: application/vnd.github.v3+json&quot; https://api.github.com/repos/PowerShell/PowerShell/releases/latest) &amp;&amp; [[ $response =~ $regex ]] &amp;&amp; downloadURL=&quot;${BASH_REMATCH[1]}&quot;<br />
  36. # download powershell<br />
  37. wget -O ./powershell.deb $downloadURL<br />
  38. # install powershell<br />
  39. sudo dpkg -i ./powershell.deb<br />
  40. # run powershell<br />
  41. pwsh</div>
  42. </li>
  43. </ol>
  44. <p>Source: <a href="https://docs.microsoft.com/en-us/powershell/scripting/install/install-debian" target="_blank">https://docs.microsoft.com/en-us/powershell/scripting/install/install-debian</a></p>
  45. </div>
  46. </div>
  47. </body>
  48. </html>