Firebird Flight Wiki: Basic System Administration
Firebird Flight

Basic System Administration

Beyond navigating and manipulating files, system administrators need to monitor user activity, manage processes, handle permissions, and automate routine tasks. This page covers fundamental commands and concepts that lay the groundwork for more advanced administration.

1. Introduction

System administration tasks often involve more than just editing files; you’ll need to view who’s logged in, manage file ownership, schedule tasks, and adjust system configurations. The commands below provide a starting point for these duties.

2. Users & Processes

Knowing who’s on the system and what processes are running is crucial for performance, troubleshooting, and security.

2a. w

The w command displays which users are logged on and what they’re doing. It also shows the system load average and how long the system has been up.

Flag / Usage Description
w Displays active users, their processes, system uptime, and load averages.
w -h Omits the header, showing only users and their processes.
Table 1: Common w Usage

2b. ps

ps (process status) displays running processes. Combined with flags, it can reveal details about processes owned by different users or system-wide processes.

Flag / Usage Description
ps Shows processes owned by the current user in the current terminal.
ps -aux Displays all processes in a user-oriented format, including those without a terminal.
ps -ef System-V style full-format listing of all processes with parent-child relationships.
Table 2: Common ps Usage

3. File Permissions

Correctly setting file permissions and ownership is key to secure system operation. The following commands manage permissions at a basic level.

3a. chmod

chmod (change mode) modifies file or directory permissions. It can use numeric (e.g., 755) or symbolic notation (e.g., u+x, g+w).

Flag / Usage Description
chmod 755 [file] Owner has read/write/execute (7); group & others have read/execute (5).
chmod +x [file] Adds execute permission for all permitted users on [file].
chmod g+w [file] Adds write permission for the group owning [file].
Table 3: Common chmod Usage

3b. chown

chown changes ownership (and optionally group) of files or directories, ensuring they’re owned by the correct user or service account.

Flag / Usage Description
chown user [file] Transfers ownership of [file] to user.
chown user:group [file] Changes both owner and group of [file].
chown -R user [dir] Recursively changes ownership of [dir] and its contents.
Table 4: Common chown Usage

4. Configuration Management

Linux systems are often configured via text files, and scheduling tasks typically involves working with crontab. Mastering these can save considerable time and headaches.

4a. crontab

The crontab utility schedules periodic jobs to run at specified intervals. Each user has their own crontab, while the system has a global one as well.

Flag / Usage Description
crontab -e Edits the current user’s crontab using the default editor.
crontab -l Lists the current user’s crontab entries.
crontab -r Removes the current user’s crontab entirely.
Table 5: Common crontab Usage

4b. Common Config Files ( /etc )

System-wide configuration usually resides under /etc. Below are a few key examples:

File / Directory Purpose
/etc/passwd Stores user account info (username, UID, etc.).
/etc/group Defines groups and the users in them.
/etc/ssh/sshd_config Config for the SSH daemon (ports, authentication methods, etc.).
/etc/hosts Maps hostnames to IP addresses, overriding DNS if present.
Table 6: Common /etc Files

5. Conclusion

Mastering these fundamental tasks—monitoring users and processes, managing file permissions and ownership, configuring cron jobs, and knowing your key system config files—will give you a solid footing in Linux system administration. From here, you can explore more advanced topics like service management, networking, and security.