Linux Commands Quick Reference Guide
This quick reference guide provides a concise overview of essential Linux commands, covering file operations, system management, and network configuration. Ideal for beginners and experienced users needing a refresher.
| Command | Description |
| pwd | Displays the current working directory. |
| ls | Lists the files in a given directory, e.g. ls –al |
| cd | Changes the directory, e.g. cd /var/www/html |
| cp | Copies files, e.g. cp file1 backup/file2 |
| mv | Moves/renames a file, e.g. mv file1 file1.bak |
| rm | Deletes a file, e.g. rm file1 |
| mkdir | Creates a directory, e.g. mkdir backup |
| cat | Displays the contents of given files, concatenating if multiple files given, e.g. cat /etc/fstab |
| more | Pages longer documents across multiple screens, e.g. more hugefile |
| ln | Makes links between files (like shortcuts), e.g. lnIn some systems this has been replaced by systemctl command service -s origfile /etc/link_to_origfile |
| find | Searches the filesystem for files, e.g. find / -name file1 |
| grep | Powerful tool for searching within text, e.g. grep 'mysql' *.log |
| vi | Text editor, e.g. vi /etc/resolv.conf |
| history | Displays the past commands typed, e.g. history |
| tar | Creates an archive of files, in most new versions it can also compress, e.g. tar czvf usera_hom.tgz /home/user1 |
| chmod | Change the permissions of a file, e.g. chmod 755 file1 (see file permissions later) |
| chown | Change ownership of a file, e.g. chown root file1 |
| chgrp | Change the group ownership of the file, e.g. chgrp staff file1 |
| df | Displays disk space usage, e.g. df -h |
| du | Displays file space usage, e.g. du -h -s /var |
| ps | Displays a snapshot of the current processes, e.g. ps aux |
| top | Displays the tasks running and their CPU/memory usage, e.g. top |
| ifconfig | Configure a network device, e.g. ifconfig eth1 up |
| wget | Gets a file via HTTP, e.g. wget http://www.awebsite.com/file.tgz |
| useradd | Add a new user, e.g. useradd fred |
| userdel | Deletes a user, e.g. userdel fred |
| passwd | Changes the passwd for a user, e.g. passwd fred |
| rpm | Package manager command, list/install/update/delete packages, e.g. rpm -qa |
| yum | Update manager, e.g. yum update |
| man | View manual pages for a given program, e.g. man ping |
| service | Start/stop/check status of a running service, e.g. service httpd start |
| shutdown | Shuts down or restarts the system, e.g. shutdown –h now |
Looking to enhance your Linux infrastructure? At EssingtonITS.co.uk, we offer expert support and tailored solutions to optimise your systems. Let us help you achieve seamless integration and improved performance.
person people found this useful.