Open In App

Beginner’s Guide to Linux System Administration

Last Updated : 23 Aug, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

A Linux System Administrator manages the operations such as maintaining proper software, observing them, and even taking care of backup and hardware systems. It is recommended that before reading this article please go through the article What is Linux System Administration. Here we have some basics of Linux System Administration. 

Some Basic Configurations

Set the Hostname: Open terminal and enter the following command in order to change the hostname.  

sudo hostname your_hostname

Replace “your_hostname” with the hostname that you want to keep. 

Setting up the time zone: Move to /usr/share/zoneinfo/your_zone and then link the zone file with /etc/localtime to set the time zone.  

sudo ln -sf Kolkata /etc/localtime

File System and Management

Managing files is the most important task in Linux as all devices, directories, and packages are just a type of file in Linux. 

1. To know about File system read the article File System in Linux
2. To learn more about Linux file hierarchy structure you can read the article Linux File System Hierarchy 
3. To get the difference between Linux and Windows File System read the article Windows vs Linux 

Below is the list of some file management commands in Linux:  

Command Description
cd Used to change the current directory
ls Used to list the directories and files in a directory
vi A good text editor to edit files
touch Used to create new files
nano A good text editor to edit files
cp Used to copy files and directories.
mv Used to move files and directories.
rm Used to remove files and directories.
fdisk Used to partition disks and to work with file systems
mount Used to mount a file system or a device

You can also read the file management in Linux from the article https://www.geeksforgeeks.org/file-management-in-linux/  

Networking Commands

Networking commands play an important role in system Administration and a good system Administrator must have good hands-on networking commands. Here is a list of such commands that are mostly used for networking in Linux. 

Command Description
route used to view and manipulate ip routing tables.
ping Used to send some packets to a server and receive them back in case of a good network connection.
traceroute Used to trace the path taken by the traffic.
nslookup Used for querying the Domain Name System to obtain domain name or IP address mapping, or other DNS records.
ifconfig Used to view and change the configuration of the network interfaces on your system
tracepath Used to traces path to destination discovering MTU along this path
ssh Provides a secure encrypted connection between two hosts over an insecure network
telnet Used to test if a port is open and even to work with telnet protocol.
curl Used to transfer data to or from a server, using any of the supported protocols.
scp Used to securely copy files and directories between two locations over a network.
w Provides a quick summary of every user logged into a computer
netcat used for performing any operation in Linux related to TCP, UDP, or UNIX-domain sockets
nmap Used for network exploration and security auditing
netstat Used for monitoring network connections both incoming and outgoing as well as viewing routing tables, interface statistics, etc
ip Used to assign an address to a network interface and/or configure network interface parameters on Linux operating systems

To learn more about Linux networking commands then read the article Linux Networking Tools  

Managing Users and Group in Linux

A system administrator has to manage the users working on the system. Users are the accounts which are logged in to your system or may log in to the system. Each user in Linux has a unique UID to identify the user. All information of the users is stored in /etc/passwd file and all hashed passwords are stored in /etc/shadow file. There are basically 2 types of user in Linux on the basis of their rights to access.  

  • Superuser or Administrator
  • General users

Each user may or may not be a part of a group which is a collection of users. To learn more about users in Linux go through the article Users in Linux System Administration. Here is a list of commands that are used to manage users. 

Command Description
usermod Used to modify users and their respective settings
useradd Used to add a new user
su and sudo Used to change the user and work with root
change Used to change the user’s aging/expiry information
groupdel Used to delete a group
gpasswd Used to change password of group
groupmod Used to modify group and its settings
groupadd Used to add a new group

To learn more about how to manage users read the article User Management in Linux 

To learn more about how to manage groups read the article Group Management in Linux 

System Diagnostics/Monitor Performance

A System Administrator should be able to diagnose problems in a system and even to monitor the performance of the system so that it may be improved. Here is the list of some useful commands for the same. 

Command Description
top Used to display the running processes.
vmstat Used to get information about processes, memory, paging, block IO, disk, and CPU scheduling
lsof Used to check list of open files.
htop Used to determine the cause of load of each process
iostat Used to monitor IO devices loading
nmon It displays performance about the CPU, MEMORY, NETWORK, DISKS, FILE SYSTEM, NFS, TOP PROCESSES, RESOURCES, AND POWER MICRO-PARTITION

Reading and Analysing Logs

A good system Administrator must have an idea of how to read and manage logs as they give a lot of crucial and required information. 

Command Description
dmesg Used to print the message buffer of the kernel
tail Used to print details from the log files located in the folder /var/log
journalctl Used to read systemd logs

 



Previous Article
Next Article

Similar Reads

Groups in Linux System Administration
Each group in a Linux system is uniquely identified by a group identification number or GID. All the information listing groups in a system are stored in /etc/group file. The hashed passwords for groups are stored in /etc/gshadow file. Every user has a primary user group and zero or more supplementary groups. On login, the group membership is set t
2 min read
Users in Linux System Administration
Users are accounts that can be used to login into a system. Each user is identified by a unique identification number or UID by the system. All the information of users in a system are stored in /etc/passwd file. The hashed passwords for users are stored in /etc/shadow file. Users can be divided into two categories on the basis of the level of acce
3 min read
What is Linux System Administration?
Linux is an operating system, or a kernel created by Linus Torvalds with other contributors. It was first released on September 17, 1991. The main advantage of Linux is that it is distributed under an open-source license, which means programmers can use the Linux Kernel to design their own custom operating systems. Most Linux code is written in C P
5 min read
Introduction to Webmin: Web-based Linux System Administration
Linux system administration can be a difficult task, especially for beginners. Command-line interfaces are powerful tools for managing Linux systems, on the other hand, they can also be complex to operate on. When it comes to GUIs, we have a Web-based solution that simplifies the management of Linux servers and makes it easy for beginners to unders
5 min read
How to Fix - Unable to Lock the Administration Directory – Kali Linux
Kali Linux is among the most famous OS for ethical hacking and pentesting. It contains all the necessary tools for pentesting and ethical hacking. Using Kali is not easy and every user has once encountered errors. In this article, we will see how to solve this particular problem using Kali Linux. What is Unable to lock the administration directory
5 min read
Beginner's Guide to Using Ubuntu on Google Cloud Platform (GCP)
Ubuntu is one of the most famous Linux distributions, popular for cloud computing, with support for OpenStack. Ubuntu is built on Debian's architecture and infrastructure and comprises Linux server, desktop, and discontinued phone and tablet operating system versions. Ubuntu is often considered as one of the user-friendly operating systems for begi
7 min read
Exodus - Copy Linux Binaries From One Linux System
Exodus is an easy-to-implement program, that is used for bundling dependencies, and also helps to effectively copy Linux ELF binaries from one to another machine securely, and this is very handy when you don't have root access, also if there are issues in the availability of the packages in the Linux distribution, Commonly Server oriented distribut
3 min read
The Ultimate Guide to Installing Blender on Linux Systems
Blender is one of the friendly tools that is used for making 3D things on computers. Artists and designers like to work with it a lot. This article will help you to install the software Blender on Kali Linux(for installing Kali Linux on your virtual box you can check here) or in Ubuntu very easily. You can get it from Blender’s website, or by using
4 min read
Difference Between Arch Linux and Kali Linux
Arch Linux is an open-source Linux-based Operating System that is freely available for use. It belongs to the Pacman-based Linux family. It is a light weighted OS for daily use and could even be used by professionals. It was first released in March 2002. It is a beginner-friendly Linux Operating System. Features of Arch Linux: Minimalist approach:
4 min read
Neofetch In Linux – Snap cool screenshots of your Linux
Neofetch is a fancy, highly customizable, and aesthetic command-line system information screenshot utility tool. Written in the Bash scripting language, it works inside a terminal window, on triggering up the command it by default displays the operating system, software, and hardware of your system on the right side of the column alongside an ASCII
4 min read