Skip to main content

RHCSA Certification Course

Chapter #7: How to Operate and Manage Running Linux Systems

In this article, we cover everything you need to manage active Linux systems, including services, processes, logs, scheduling, and secure file transfers.

As a Linux System Administrator, you need to have a firm grasp of basic administration concepts to effectively and seamlessly operate and manage Linux servers.

In this chapter, we shine the spotlight on key concepts that you need to have at your fingertips to enable you to execute your tasks like a professional.

Log in and Switch Users in Multiuser Targets

One of the fundamental skills a seasoned or a budding Linux user needs to know is how to manage users on your system.

šŸ’”
Linux is a multiuser system, meaning multiple users can log in and work on the system simultaneously, each with their own permissions and environment settings.

To log in to your system, use the SSH syntax:

ssh root@server-IP
OR
ssh -l user@server-IP

Once logged in, you can confirm the user you are currently logged on as using the command:

whoami
Figure1:SSH User Login

As seen from the output above, I’m logged in as a user called ravisaive.

You can further obtain additional details such as UID (User ID) and GID (Group ID) using the id command.

id
Figure2:Find User ID

Linux users are stored in the /etc/passwd file. You can view the list of users by typing the command:

cat /etc/passwd
Figure3:Basic Info About Users

The /etc/passwd file contains both system users and regular users.

To switch to another user, simply use the command.

su username

For example, to switch to usertecmint, run.

su tecmint

Again, to confirm the user you are currently logged on to, execute the command:

whoami
Figure4:Switch Users

System users are identified using the /sbin/nologin suffix at the end of the user information details. This implies that you cannot switch into them and use them for logon purposes.

You can only switch and log in to regular users with the /bin/bash at the tail end, indicating that they are shell users.

Boot, Reboot, and Shut Down a System Normally

In this section, we will tackle how to reboot and shut down a system.

Rebooting a Linux System

To reboot your system as a root user, try any of the commands as shown:

reboot
systemctl reboot
shutdown -r now
init 6 
telinit 6

The last two commands instruct the system to switch to run level 6, which automatically reboots the system.

šŸ’”
While init and telinit are still available for compatibility in many distributions, they are part of the older SysV init system. Modern systems use systemd, and therefore systemctl is preferred on most recent Linux distros like CentOS 7+, RHEL 7+, Ubuntu 16.04+.
šŸ’”
The shutdown -r now command schedules a reboot immediately. You can also schedule it for later using shutdown -r +5 to reboot after 5 minutes.

Shutting Down a Linux System

To shut down your Linux system, issue any of these commands as a root user:

halt
systemctl halt
poweroff
systemctl poweroff
shutdown -h now
init 0
telinit 0
šŸ’”
For remote systems, always use shutdown or systemctl commands rather than just halt, to ensure services are gracefully stopped before powering off.

To schedule a shutdown at a specific time (e.g., 10:30 PM), use:

shutdown -h 22:30