University of
Hargeisa
College of Engineering, Computing and IT
Essential Linux
Commands
By: Omar Yahye
Presentation
Outline File and Directory Management
01
02 File Content Editing
03 System and Process
04 User and Permissions
Introduction
• Unlock the full potential of your Linux system with this comprehensive guide to
essential Linux commands. Whether you’re a seasoned administrator or just
starting out, mastering these commands is crucial for efficient server management,
script writing, and troubleshooting.
• In this slide, you will learn the most frequently used and powerful commands for
file management, process control, user access, network configuration, and system
debugging.
• You will learn over 50+ must-know Linux commands that will transform you into a
Linux power user. From basic to advanced, these commands will become your go-
to tools for tackling any task that comes your way.
File and Directory Management
Command Description Example
ls Lists files and directories ls -l
cd Changes the current directory cd /home/user/Documents
pwd Prints the current directory pwd
mkdir Creates a new directory mkdir new_folder
rm Removes files or directories rm file.txt, rm -r folder
cp Copies files or directories cp source.txt destination.txt
mv Moves or renames files or directories mv oldname.txt newname.txt
touch Creates an empty file touch newfile.txt
find Searches for files and directories find / -name "file.txt"
du Shows file/directory size du -sh folder/
Archiving and Compression
Command Description Example
tar Archives/compresses files into .tar/.gz tar -czvf archive.tar.gz
folder/
tar Decompress file tar –xzvf archive.tar.gz –C
folder/
File Content and Editing
Command Description Example
cat Displays file contents cat file.txt
nano Opens a file in a simple text editor nano file.txt
grep Searches inside files for matching text grep "text" file.txt
System and Process Management
Command Description Example
top Displays real-time system and process info top
ps Lists running processes ps aux
kill Terminates a process kill 1234
df Shows disk space usage df -h
history Shows command history history
Software Installation and Package Management
Command Description Example
Package manager for Debian-based
apt sudo apt install vim
systems
Runs command with administrator
sudo sudo apt update
privileges
User and Permission Management Commands
Command Description Example
passwd Change user password. passwd <username>
adduser/ useradd Add a new user. adduser <username> or useradd
<username>
deluser / userdel Delete a user. deluser <username> or userdel
<username>
usermod Modify user account. usermod -aG <group> <username>
groups Show group memberships. groups <username>
sudo Execute commands as root. sudo <command>
chage Change user password expiry chage -l <username>
information.
id Display user identity information. id <username>
newgrp Log in to a new group. newgrp <group>
Permissions and Ownership
Command Description Example
chmod Changes file permissions chmod 755 script.sh
chown Changes file ownership chown user:group file.txt
Help and Documentation
Command Description Example
man Displays manual for a command man ls