Knowledgebase

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 level

Working 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 terminal

Permissions and ownership

chmod 644 file.txt          # set permissions
chown user:group file.txt   # change owner

System and processes

top            # live process view
df -h          # disk usage
free -h        # memory usage
sudo systemctl status nginx   # service status

Combine commands with pipes (|) and search text with grep, e.g. ps aux | grep php.

Was this answer helpful?

0 Users Found This Useful

Powered by WHMCompleteSolution