متوسط 120 دقیقه 2024/01/25

مدیریت سیستم لینوکس: راهنمای کامل

آموزش تفصیلی که همه چیز مورد نیاز برای تبدیل شدن به یک مدیر سیستم حرفه‌ای لینوکس را پوشش می‌دهد. مدیریت کاربر، کنترل سرویس، امنیت و موارد بیشتر.

linux admin مدیریت سیستم مدیریت سرور devops

Linux System Administration

1. User and Group Management

Creating Users

# Add new user
sudo useradd -m -s /bin/bash username

# Set password
sudo passwd username

# View user info
id username

Group Operations

# Create group
sudo groupadd groupname

# Add user to group
sudo usermod -aG groupname username

# List groups
groups username

2. Service Management (systemd)

Systemctl Commands

# Start service
sudo systemctl start nginx

# Stop service
sudo systemctl stop nginx

# Restart service
sudo systemctl restart nginx

# Check status
sudo systemctl status nginx

# Enable on boot
sudo systemctl enable nginx

# Disable on boot
sudo systemctl disable nginx

3. Log Management

Important Log Files

# System logs
/var/log/syslog
/var/log/messages

# Authentication logs
/var/log/auth.log

# Application logs
/var/log/apache2/
/var/log/nginx/

Using Journalctl

# View all logs
journalctl

# Last 100 lines
journalctl -n 100

# Specific service
journalctl -u nginx

# Follow in real-time
journalctl -f