Difference between revisions of "Ubuntu (PowerShell)"

Jump to navigation Jump to search
607 bytes added ,  13:19, 5 December 2021
Added Path Permission Error
(Initial creation)
 
(Added Path Permission Error)
 
Line 5: Line 5:
  wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
  wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
  dpkg -i packages-microsoft-prod.deb
  dpkg -i packages-microsoft-prod.deb
=== Path Permission Error ===
If you get the following error whenever running a command - '''Error reading or writing history file'''.  Its likely PowerShell was installed as root, but you're now running as a standard user, do the following...
sudo pwsh
$refDir = Resolve-Path '~'
$dstDir = Resolve-Path '~/.local/share/powershell'
chown -R --reference=$refDir $dstDir
exit
Above came from https://github.com/PowerShell/PowerShell/issues/10601
== Getting Started ==
To enter the PowerShell command line interface use the following command
pwsh
To run a PowerShell script
pwsh ./do-something.ps1


[[Category:Ubuntu]]
[[Category:Ubuntu]]
[[Category:PowerShell]]
[[Category:PowerShell]]

Navigation menu