Linux
WSL
以下命令依次为:
- 安装分发版
- 查看状态
- 列出已安装的分发版
- 注销已安装的分发版
powershell
wsl --install
wsl --status
wsl --list
wsl --unregister ubuntu
IP Forward
bash
sysctl -w net.ipv4.ip_forward=1
NodeJs
bash
# Install LTS by nodesource
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
# Uninstall nodejs if installed by nodesource
apt-get purge nodejs &&\
rm -r /etc/apt/sources.list.d/nodesource.list &&\
rm -r /etc/apt/keyrings/nodesource.gpg
# Install LTS by pnpm
curl -fsSL https://get.pnpm.io/install.sh | sh -
pnpm env use -g lts
pnpm env ls
pnpm env ls --remote
pnpm env add -g 18
pnpm env rm -g lts
Commands
- ssh user@127.0.0.1
- ls -la
- pwd
- cd
- touch
- echo
- nano
- vim
- cat
- shred
- mkdir
- cp & mv
- rm -r
- rmdir
- ln
- clear
- whoami
- useradd
- sudo
- adduser
- su
- exit
- passwd
- apt
- finger
- man
- whatis
- whereis
- wget
- curl
- zip
- unzip
- less
- head
- tail
- cmp
- diff
- sort
- find
- chmod
- chown
- ifconfig
- ip address
- grep
- awk
- resolvectl
- ping
- traceroute
- netstat
- ss
- iptables
- ufw
- uname
- neofetch
- cal
- free
- df
- ps
- top
- htop
- kill
- pkill
- systemctl
- history
- reboot
- shutdown
bash
ssh user@127.0.0.1
ls -la
pwd
cd
touch
echo
nano
vim
cat
shred
mkdir
cp
mv
rm -r
rmdir
ln
clear
su