0% found this document useful (0 votes)
9 views

Essential Linux Commands for DevOps

The document provides a comprehensive list of essential Linux commands categorized into various sections including Disk Usage, Process Management, System-Level Commands, User & Group Management, Package Managers, File Permission & Ownership, and Compression & Archiving. Each section includes specific commands along with brief descriptions of their functions. This serves as a quick reference guide for users to manage and operate Linux systems effectively.

Uploaded by

D Pavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Essential Linux Commands for DevOps

The document provides a comprehensive list of essential Linux commands categorized into various sections including Disk Usage, Process Management, System-Level Commands, User & Group Management, Package Managers, File Permission & Ownership, and Compression & Archiving. Each section includes specific commands along with brief descriptions of their functions. This serves as a quick reference guide for users to manage and operate Linux systems effectively.

Uploaded by

D Pavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Essential Linux Commands

Disk Usage Commands: -


df - Show disk space usage
df -h - Human-readable disk usage
du - Estimate file space usage
du -sh - Summarize and display human-readable
size of directories/files
Process Management: -
top - Real-time system process view
ps aux - Detailed info on running processes
fuser - Identify processes using files or sockets
kill <PID> - Terminate process by ID
free - Display memory usage
free -h - Human-readable memory stats
nohup - Run command immune to hangups
vmstat - Report system performance
vmstat -a - Include active/inactive memory stats
Essential Linux Commands
System-Level Commands: -
uname -a - All system info: kernel, OS, platform
uptime - System uptime and load
date - Current system date and time
whoami - Logged-in user's name
who - List of users currently logged in
w - Who's logged in and what they are doing
which <cmd> - Path to a command (e.g., python,
bash)
id - Show user ID, group ID, and groups
sudo - Execute command as superuser
shutdown - Shutdown the system
reboot - Restart the system
Essential Linux Commands
User & Group Management: -
useradd <user> - Create new user
useradd -m <user> - Create user with home
directory
passwd <user> - Set/change password
su <user> - Switch to another user
userdel <user> - Delete user
groupadd <group> - Create group
gpasswd -a user group - Add user to group
gpasswd -M users group - Set group members
groupdel <group> - Delete group
Essential Linux Commands
Package Managers: -
apt / apt-get - Debian-based systems (Ubuntu)
yum - CentOS package manager
dnf - Fedora package manager
pacman - Arch Linux
portage - Gentoo
rpm - RedHat Package Manager
File Permission & Ownership: -
chmod <mode> <file> - Change file permissions
ls -l - List files with permissions
umask - Default permission mask (e.g., 0022)
chown user:group file - Change file owner and
group
chgrp <group> <file> - Change group ownership
Essential Linux Commands
Compression & Archiving: -
zip <file>.zip <file> - Compress files
zip -r <file>.zip <folder> - Recursively zip
directory
unzip <file>.zip - Extract zipped file
gunzip <file>.gz - Decompress .gz file
tar -cf archive.tar files - Create tar archive
tar -xf archive.tar - Extract tar archive

You might also like