Linux System Administration
What is Linux System Administration?
Linux System Administration involves installing, configuring, maintaining, securing, and troubleshooting Linux servers and systems to ensure reliability, performance, and security.
🔹 Core Responsibilities
- User & group management
- File system & storage management
- Package & software management
- Process & service management
- Network configuration
- System monitoring & troubleshooting
- Security & access control
- Backup & recovery
- Automation & scripting
🔹 Essential Linux Admin Skills
1️⃣ User & Group Management
useradd user1
passwd user1
usermod -aG sudo user1
groupadd developers
Files:
- /etc/passwd
- /etc/shadow
- /etc/group
2️⃣ File System & Permissions
ls -l
chmod 755 file.sh
chown user:group file
df -h
du -sh *
mount /dev/sdb1 /mnt
Permissions: r (4) | w (2) | x (1)
3️⃣ Package Management
Debian/Ubuntu
apt update
apt install nginx
apt remove nginx
RHEL/CentOS
yum install httpd
dnf update
4️⃣ Process & Service Management
ps aux
top
htop
kill -9 PID
systemctl start nginx
systemctl enable nginx
systemctl status nginx
5️⃣ Networking Basics
ip a
ip r
ping google.com
netstat -tulnp
ss -tulnp
nmcli device status
Config files:
- /etc/network/interfaces
- /etc/netplan/*.yaml
6️⃣ Disk & Storage Management
lsblk
fdisk /dev/sdb
mkfs.ext4 /dev/sdb1
mount /dev/sdb1 /data
LVM:
pvcreate /dev/sdb
vgcreate vg_data /dev/sdb
lvcreate -L 10G -n lv_data vg_data
7️⃣ Logs & Monitoring
journalctl
journalctl -u nginx
tail -f /var/log/syslog
uptime
free -h
vmstat
8️⃣ Security & Access Control
ufw enable
ufw allow 22
iptables -L
SELinux:
getenforce
setenforce 0
SSH:
ssh user@server-ip
9️⃣ Backup & Compression
tar -czvf backup.tar.gz /data
rsync -av /data /backup
crontab -e
🔟 Shell Scripting (Automation)
#!/bin/bash
df -h >> disk_report.txt
Make executable:
chmod +x script.sh
🔹 Important Configuration Files
FilePurpose/etc/fstabMount points/etc/hostsHostname mapping/etc/resolv.confDNS/etc/ssh/sshd_configSSH/etc/crontabScheduled jobs
🔹 Common Linux Admin Interview Questions
- Difference between soft link & hard link
- What happens during Linux boot process
- How to check high CPU usage
- How to recover root password
- Difference between systemctl and service
- How permissions work in Linux