| Action | Shortcut |
|---|---|
| Scroll line up | ctrl+shift+up (also ⌥+⌘+⇞ and ⌘+↑ on macOS) |
| Scroll line down | ctrl+shift+down (also ⌥+⌘+⇟ and ⌘+↓ on macOS) |
| Scroll page up | ctrl+shift+page_up (also ⌘+⇞ on macOS) |
| Scroll page down | ctrl+shift+page_down (also ⌘+⇟ on macOS) |
| #https://unix.stackexchange.com/questions/43957/using-rsync-to-move-not-copy-files-between-directories | |
| #!/usr/bin/bash | |
| echo -e "Would you like to use a relative path to your source?[y/n?]\n" | |
| read ans | |
| if [[ $ans == y ]]; then | |
| echo -e "Relative source?\n" | |
| read source | |
| source="`pwd`/$source" |
| eb --install-latest-eb-release --prefix /software/easybuild --allow-modules-tool-mismatch | |
| export PATH=/software/lmod-8.7.24/lmod/libexec:$PATH | |
| source /software/lmod-8.7.24/lmod/lmod/init/bash | |
| export LMOD_CMD=/software/lmod-8.7.24/lmod/lmod/libexec/lmod |
| code tunnel > ct_out 2> tc_err &; disown |
| #!/usr/bin/env bash | |
| # prereqs | |
| sudo apt update -y && sudo apt install -y \ | |
| build-essential \ | |
| libssl-dev \ | |
| uuid-dev \ | |
| libgpgme11-dev \ | |
| squashfs-tools \ |
The Windows version of OpenSSH client doesn't include a ssh-copy-id command. I don't know why. If it does one day, then this can be ignored.
NOTE If you have Windows Subsystem for Linux (WSL) installed, you can use the linux version of ssh-copy-id instead. Go to the description at the end of this document.
- Download the file
ssh-copy-id.cmdto your Windows PC, or copy and paste its contents. - Run the script passing your linux ssh information (for example
ssh-copy-id.cmd [email protected]). This should work with any Linux platform. Alternatively, if you have experience, you can use the powershell version.ssh-copy-id.ps1. Run the script aspowershell .\ssh-copy-id.ps1 [email protected]. - Run the command for each linux account you connect with. You will be prompted for your Linux host password. If you have more than 1 account on any machine, you must do this for each account.
The file name and location of the script is not important but the filename extension must be .cmd
| wget https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/20230716T164653Z/stage3-amd64-desktop-openrc-20230716T164653Z.tar.xz | |
| wsl --import Gentoo C:\Users\parma\AppData\Local\Packages\Gentoo\ .\stage3-amd64-desktop-openrc-20230716T164653Z.tar.xz --version 2 | |
| wsl -d Gentoo | |
| #start root session | |
| wsl -u root -d Gentoo |
WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277
Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.
| cd /etc/resolvconf/resolv.conf.d | |
| sudo cp -p head head.orig #backup copy, always do this | |
| #sudo nano head | |
| #nameserver <ip_of_nameserver> | |
| echo "nameserver 8.8.8.8" | sudo tee -a head | |
| #regenerate resolvconf | |
| sudo resolvconf -u |
| # check execution policy | |
| If ((Get-ExecutionPolicy) -eq 'Restricted') { | |
| Set-ExecutionPolicy Unrestricted -Scope CurrentUser | |
| } | |
| # check powershell $PROFILE | |
| If (!(Test-Path $PROFILE)) { | |
| Write-Host "No PowerShell $PROFILE detected, creating one.." -ForegroundColor Magenta | |
| New-Item -ItemType File -Path $PROFILE -Force | |
| Write-Host "Created PowerShell Profile at: $PROFILE" -ForegroundColor Green |