Linux System Administration

Essential skills and knowledge for managing Linux systems

1. User and Group Management

Managing users and groups is a fundamental task for system administrators.

# Example: Create a new user sudo useradd -m -s /bin/bash newuser # Add user to a group sudo usermod -aG sudo newuser

2. File System Management

Understanding and managing the file system is crucial for system administration.

# Check disk usage df -h # Check directory size du -sh /path/to/directory # Create an ext4 file system sudo mkfs.ext4 /dev/sdb1

3. Process Management

Monitoring and controlling processes is essential for system performance and troubleshooting.

# View all processes ps aux # Kill a process by PID kill -9 1234 # Change process priority renice -n 10 -p 1234

4. System Monitoring and Logging

Keeping track of system performance and logs is crucial for maintaining system health.

# View system logs sudo tail -f /var/log/syslog # Check system activity sar -u 1 5

5. Networking

Configuring and troubleshooting network connections is a key skill for system administrators.

# Configure network interface sudo ip addr add 192.168.1.100/24 dev eth0 # Check open ports sudo netstat -tuln

6. Package Management

Keeping the system updated and managing software is essential for security and functionality.

# Update package list and upgrade (Ubuntu) sudo apt update && sudo apt upgrade # Install a package (Fedora) sudo dnf install package_name

7. Backup and Recovery

Regular backups and knowing how to recover systems are crucial for data integrity and disaster recovery.

# Create a backup using rsync rsync -avz /source/directory /destination/directory # Create a compressed archive tar -czvf backup.tar.gz /path/to/directory

Warning:

Always be cautious when performing system administration tasks, especially those involving critical system files or configurations. Make sure to have backups and understand the implications of your actions.

Further Learning

System administration is a vast field. Consider exploring these related topics:






Scroll to Top