If you are working with a Linux VPS for the first time, here are the most important commands:
Navigation
pwd # shows the current directoryls -la # list the files
cd /var/www # go to a directory
cd .. # one directory up
Files and directories
mkdir folder # create a directoryrm file # delete a file
rm -rf folder # delete a directory
cp file1 file2 # copy
mv file1 file2 # move/rename
nano file # edit a file
cat file # read a file
System
top # running processesdf -h # free disk space
free -h # RAM memory
uptime # server uptime
reboot # restart
Network
ping google.com # network testcurl -I site.com # HTTP request
ss -tlnp # open ports
Packages (Ubuntu/Debian)
apt update # update the package listapt upgrade # upgrade the packages
apt install nginx # install a package
apt remove nginx # uninstall
Any questions? Write here!