Update packages/apps
sudo apt update && sudo apt upgrade
Compress/Decompress a file
tar -zcvf compressedFileName.tar.gz directoryName
tar -zxvf
compressedFileName.tar.gz
WSL use ssh key on remote server:
eval ‘ssh-agent -s
‘
ssh-add -t 60m ~/.ssh/id_rsa
ssh -A user:address
MySQL
sudo apt install mysql-server sudo mysql_secure_installation sudo /etc/init.d/mysql start sudo service mysql restart
For WSL automatic start after restart:
sudo update-rc.d mysql defaults
SSH
adduser roman
usermod -aG sudo roman
su - hideo
mkdir ~/.ssh && chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
nano ~/.ssh/authorized_keys
sudo ufw app list
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status
sudo apt update
sudo apt upgrade -u
sudo reboot
nginX
sudo nano /etc/nginx/nginx.conf
uncomment server_tokens off;