{"id":1625,"date":"2023-03-26T17:14:44","date_gmt":"2023-03-26T15:14:44","guid":{"rendered":"https:\/\/alessandromasciadri.com\/?p=1625"},"modified":"2023-03-26T17:17:40","modified_gmt":"2023-03-26T15:17:40","slug":"come-installare-powershell-su-ubuntu","status":"publish","type":"post","link":"https:\/\/alessandromasciadri.com\/come-installare-powershell-su-ubuntu\/","title":{"rendered":"Come installare PowerShell su Ubuntu"},"content":{"rendered":"\t\t<div data-akihiro-type=\"ama-post\" data-akihiro-id=\"1625\" class=\"akihiro akihiro-1625\" data-akihiro-post-type=\"post\">\n\t\t\t\t<div class=\"akihiro-element akihiro-element-1742c88 e-flex e-con-boxed e-con e-parent\" data-id=\"1742c88\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"akihiro-element akihiro-element-001e2a4 akihiro-widget akihiro-widget-text-editor\" data-id=\"001e2a4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Ormai Microsoft e Linux non sono pi\u00f9 gli acerrimi nemici di una volta. Microsoft ha abbracciato il mondo Open Source da un po&#8217; di anni, da quando in sostanza ha capito che pu\u00f2 ottenere pi\u00f9 profitto facendo lavorare frotte di esperti entusiasti con budget che non sarebbero adeguati in altri contesti.<\/p><p>I package di PowerShell sono liberamente scaricabili da GitHub: <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\">https:\/\/github.com\/PowerShell\/PowerShell<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-7c7b9b7 akihiro-widget akihiro-widget-heading\" data-id=\"7c7b9b7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t<h3 class=\"akihiro-heading-title akihiro-size-default\">Installazione via Package Repository<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-62912b3 akihiro-widget akihiro-widget-text-editor\" data-id=\"62912b3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Ubuntu usa APT (Advanced Package Tool) come package manager. In questa guida vediamo come installare PowerShell utilizzando APT.<\/p><p>In base alla versione che si utilizza di Ubuntu, l&#8217;URL del package cambia:<\/p><ul><li>Ubuntu 22.04 &#8211; <code>https:\/\/packages.microsoft.com\/config\/ubuntu\/22.04\/packages-microsoft-prod.deb<\/code><\/li><li>Ubuntu 20.04 &#8211; <code>https:\/\/packages.microsoft.com\/config\/ubuntu\/20.04\/packages-microsoft-prod.deb<\/code><\/li><li>Ubuntu 18.04 &#8211; <code>https:\/\/packages.microsoft.com\/config\/ubuntu\/18.04\/packages-microsoft-prod.deb<\/code><\/li><\/ul><p>Utilizziamo i seguenti comandi per installare PowerShell scegliendo automaticamente la versione corretta per la specifica versione di Ubuntu.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-2671569 akihiro-widget akihiro-widget-code-highlight\" data-id=\"2671569\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp># Update the list of packages\nsudo apt-get update\n# Install pre-requisite packages.\nsudo apt-get install -y wget apt-transport-https software-properties-common\n# Download the Microsoft repository GPG keys\nwget -q \"https:\/\/packages.microsoft.com\/config\/ubuntu\/$(lsb_release -rs)\/packages-microsoft-prod.deb\"\n# Register the Microsoft repository GPG keys\nsudo dpkg -i packages-microsoft-prod.deb\n# Update the list of packages after we added packages.microsoft.com\nsudo apt-get update\n# Install PowerShell\nsudo apt-get install -y powershell<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-3335b1e akihiro-widget akihiro-widget-text-editor\" data-id=\"3335b1e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Possiamo a questo punto avviare PowerSell con il seguente comando<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-328de78 akihiro-widget akihiro-widget-code-highlight\" data-id=\"328de78\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp># Start PowerShell\npwsh<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Ormai Microsoft e Linux non sono pi\u00f9 gli acerrimi nemici di una volta. Microsoft ha abbracciato il mondo Open Source da un po&#8217; di anni, da quando in sostanza ha capito che pu\u00f2 ottenere pi\u00f9 profitto facendo lavorare frotte di esperti entusiasti con budget che non sarebbero adeguati in altri contesti. I package di PowerShell [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[20,26,19],"class_list":["post-1625","post","type-post","status-publish","format-standard","hentry","category-sistemistica","tag-linux","tag-powershell","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/1625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/comments?post=1625"}],"version-history":[{"count":4,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/1625\/revisions"}],"predecessor-version":[{"id":1629,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/1625\/revisions\/1629"}],"wp:attachment":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/media?parent=1625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/categories?post=1625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/tags?post=1625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}