essential commands every system administrator, SAP HANA professional, and Linux user should know. Organized into clear categories like file management, networking, user control, and system monitoring, this guide serves as a daily reference for both beginners and experienced users. Whether you're troubleshooting servers, managing SAP HANA, or just exploring Linux, these commands will boost your productivity and command-line confidence.
📁 File and Directory Management
|
Command |
Description |
Example |
|
ls |
List files and
directories |
ls -l /home/user —
Shows detailed list of files |
|
cd |
Change directory |
cd /etc — Move to
/etc directory |
|
pwd |
Show current
directory path |
pwd — Shows your
current directory |
|
mkdir |
Create new directory |
mkdir myfolder —
Creates a folder named myfolder |
|
rmdir |
Remove empty
directory |
rmdir olddir —
Deletes the directory if empty |
|
rm |
Remove files or
directories |
rm file.txt —
Deletes file.txt |
|
rm -r |
Remove folders
recursively |
rm -r myfolder —
Deletes folder and contents |
|
cp |
Copy
files/directories |
cp a.txt b.txt —
Copies a.txt to b.txt |
|
mv |
Move or rename
files/folders |
mv old.txt new.txt —
Renames file |
|
touch |
Create an empty file |
touch notes.txt —
Creates notes.txt |
|
cat |
View file contents |
cat readme.txt —
Prints file contents |
|
more |
View file contents
page-wise |
more bigfile.txt |
|
less |
Scrollable file
viewer |
less bigfile.txt |
|
head |
Show first lines of
a file |
head -n 10 file.txt |
|
tail |
Show last lines of a
file |
tail -n 10 file.txt |
|
stat |
Show file/directory
details |
stat file.txt |
|
file |
Show file type |
file image.jpg |
|
basename |
Show filename from
path |
basename
/path/to/file.txt |
|
dirname |
Show directory name
from path |
dirname
/path/to/file.txt |
|
find |
Search
files/directories |
find /home -name
'*.txt' |
📦 File Permissions and Ownership
|
Command |
Description |
Example |
|
chmod |
Change file
permissions |
chmod 755 script.sh |
|
chown |
Change file owner |
chown user:group
file.txt |
|
chgrp |
Change group
ownership |
chgrp staff file.txt |
|
umask |
Default permission
mask |
umask 022 |
|
ls -l |
View file
permissions |
ls -l file.txt |
🔎 Search and Filter
|
Command |
Description |
Example |
|
grep |
Search in files |
grep
"error" logfile.log |
|
egrep |
Extended grep |
`egrep "error |
|
fgrep |
Fixed-string grep |
fgrep
"error" logfile.log |
|
locate |
Find files by name
(uses DB) |
locate file.txt |
|
which |
Find location of
command |
which python |
|
whereis |
Locate
binary/source/man |
whereis ls |
|
type |
Display command type |
type cd |
💻 System Monitoring
|
Command |
Description |
Example |
|
top |
View real-time
system processes |
top |
|
htop |
Enhanced process
viewer |
htop |
|
free -h |
Show memory usage |
free -h |
|
df -h |
Show disk space |
df -h |
|
du -sh |
Folder size summary |
du -sh * |
|
vmstat |
System performance |
vmstat 1 |
|
iostat |
CPU & disk I/O
stats |
iostat |
|
uptime |
Show uptime/load |
uptime |
|
who |
Show logged-in users |
who |
|
w |
Show who is logged
in & what they are doing |
w |
🧩 User and Group Management
|
Command |
Description |
Example |
|
adduser |
Add new user |
adduser sanjay |
|
useradd |
Add user (low-level) |
useradd -m raj |
|
passwd |
Change password |
passwd sanjay |
|
deluser |
Remove a user |
deluser sanjay |
|
usermod |
Modify user |
usermod -aG sudo
sanjay |
|
groupadd |
Create group |
groupadd admin |
|
groupdel |
Delete group |
groupdel admin |
|
groups |
Show user's groups |
groups sanjay |
|
id |
Show UID/GID of user |
id sanjay |
🔐 Network Commands
|
Command |
Description |
Example |
|
ping |
Test connectivity |
ping google.com |
|
netstat |
Network statistics |
netstat -tulpn |
|
ss |
Socket statistics |
ss -tuln |
|
ifconfig |
Show IP info (older) |
ifconfig |
|
ip addr |
Show IP info
(modern) |
ip addr show |
|
hostname |
Show system name |
hostname |
|
traceroute |
Trace route to host |
traceroute
google.com |
|
nslookup |
DNS lookup |
nslookup openai.com |
|
curl |
Fetch URL data |
curl
http://example.com |
|
wget |
Download file |
wget
http://example.com/file.txt |
⚙️ Process Management
|
Command |
Description |
Example |
|
ps |
Show processes |
`ps aux |
|
kill |
Kill a process |
kill 1234 |
|
killall |
Kill by name |
killall firefox |
|
nice |
Start process with
priority |
nice -n 10 command |
|
renice |
Change process
priority |
renice -n 5 -p 1234 |
🗃️ Archives and Compression
|
Command |
Description |
Example |
|
tar |
Create/extract
archive |
tar -czf
archive.tar.gz folder/ |
|
gzip |
Compress file |
gzip file.txt |
|
gunzip |
Decompress .gz file |
gunzip file.txt.gz |
|
zip |
Create zip archive |
zip file.zip file1
file2 |
|
unzip |
Extract zip file |
unzip file.zip |
⌛ Scheduling and Background Tasks
|
Command |
Description |
Example |
|
cron |
Schedule jobs |
Edit with crontab -e |
|
at |
Run command at a
certain time |
at 14:00 |
|
bg |
Resume job in
background |
bg %1 |
|
fg |
Bring job to
foreground |
fg %1 |
|
jobs |
List background jobs |
jobs |
🧹 System Utilities
|
Command |
Description |
Example |
|
clear |
Clear terminal
screen |
clear |
|
history |
Show command history |
history |
|
alias |
Create shortcut |
alias ll='ls -l' |
|
uname -a |
Show system info |
uname -a |
|
date |
Show current
date/time |
date |
|
cal |
Show calendar |
cal |
|
echo |
Display message |
echo Hello World |
|
whoami |
Show current user |
whoami |
100 Essential Linux Commands for Daily Use!
Master Linux: 100 Must-Know Commands for Everyday Tasks
Unlock the Power of Linux: 100 Commands You Need to Know!
Top 100 Linux Commands to Boost Your Productivity
100 Linux Commands Every User Should Know!
From Beginner to Pro: 100 Linux Commands You Can’t Miss
100 Linux Commands to Streamline Your Workflow
Power Up Your Linux Skills: 100 Key Commands for Daily Use
100 Linux Terminal Commands to Know & Use Every Day!
Daily Linux Hacks: 100 Essential Terminal Commands


0 Comments:
Post a Comment
pawarsolution