Essential Linux Commands for Beginners
A quick reference to the Linux commands you’ll use every day when managing your server.
Navigating the filesystem
pwd # print current directory
ls -lah # list files (long, all, human sizes)
cd /var/www # change directory
cd .. # go up one levelWorking with files
cp file.txt backup.txt # copy
mv old.txt new.txt # move / rename
rm file.txt # delete
mkdir myfolder # create directory
cat file.txt # view contents
nano file.txt # edit in terminalPermissions and ownership
chmod 644 file.txt # set permissions
chown user:group file.txt # change ownerSystem and processes
top # live process view
df -h # disk usage
free -h # memory usage
sudo systemctl status nginx # service statusCombine commands with pipes (|) and search text with grep, e.g. ps aux | grep php.