Skip to content

Instantly share code, notes, and snippets.

@mforets
Last active March 16, 2020 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mforets/a0bf05b5e39c73f3728118fd4050da7f to your computer and use it in GitHub Desktop.
Save mforets/a0bf05b5e39c73f3728118fd4050da7f to your computer and use it in GitHub Desktop.
Windows commands

Powershell

List the PATH in PowerShell

See https://www.build-business-websites.co.uk/set-path-environment-variable-windows-powershell/

(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path

To copy the contents into $theCurrentPath

$theCurrentPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path

Easier:

PS C:\Users\marce> $juliaFolder = "C:\Users\marce\AppData\Local\Julia-1.1.1\bin"

PS C:\Users\marce> $env:path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Git\cmd;C:\Users\marce\AppData\Local\Microsoft\WindowsApps;C:\Users\marce\AppData\Local\atom\bin

PS C:\Users\marce> $env:Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Git\cmd;C:\Users\marce\AppData\Local\Microsoft\WindowsApps;C:\Users\marce\AppData\Local\atom\bin

PS C:\Users\marce> $env:Path = $env:Path + ";" + $juliaFolder

PS C:\Users\marce> $env:Path

https://codingbee.net/powershell/powershell-make-a-permanent-change-to-the-path-environment-variable

https://stackoverflow.com/questions/546583/why-is-the-powershell-environment-path-different-to-the-system-environment-path

Git

https://help.github.com/en/articles/caching-your-github-password-in-git

Jupyter

http://technivore.org/posts/2016/02/27/windows-jupyter-three-ways.html

http://www.calvin.edu/~sld33/InstallPython.html

https://stackoverflow.com/questions/36632215/python-m-to-open-ipython-notebook-from-windows-powershell

https://stackoverflow.com/questions/37117571/where-does-anaconda-python-install-on-windows

Problems

Atom

Linux

Linux Manjaro

Resolution

Pop OS

Elementary OS

Fedora

Installing

Uninstalling the previous linux distribution

Disabling the table mode

Installing Atom

Installing TexStudio

Installing latex dependencies

Installing LaTeX and XeTeX

sudo dnf -y install texlive
    texlive-latex
    texlive-xetex
    texlive-collection-latex
    texlive-collection-latexrecommended
    texlive-xetex-def
    texlive-collection-xetex

Laptop keyboard not working at boot

Issues with hibernation

Disable table mode

Installing R

Issues with second monitor

Issues with touchpad

GLFW

Trackpad blocked

# fix:
sudo rmmod i2c_hid
sudo modprobe i2c_hid

# permanent:
echo 'if [ "$1" = "post" ] && exec rmmod i2c_hid ; modprobe i2c_hid' > /usr/lib/systemd/system-sleep/touchpad-fix.sh
chmod +x /usr/lib/systemd/system-sleep/touchpad-fix.sh


pkill -KILL gnome-software
rm -rf ~/.cache/gnome-software

@dfcaporale
Copy link

Alternative way to setting Windows PowerShell environment variables:

1.- Run PowerShell as administrator
2.- From the PowerShell prompt, do:
setx PATH "$env:path;C:\Users\Daniel\AppData\Local\Julia-1.1.1\bin" -m
A SUCCESS message should appear
3.- Restart PowerShell

@mforets
Copy link
Author

mforets commented Mar 6, 2020

To edit the environment variables in Windows it is convenient to do this in the System panel: https://www.computerhope.com/issues/ch000549.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment