This hands-on lab allows you to gain an understanding of how to collect important information about your Linux server’s configuration. You will be provided a CentOS 7 Linux server build, and you will exercise using several commands to find the system’s current state regarding its processor, memory, storage, network config, OS, software inventory, and user accounts. You will find the location of the various log and configuration files on your system and use commands like: cat, lscpu, lsblk, fdisk, ip addr, free, df, du, parted, hostname, firewall-cmd, ethtool, uname, and crontab.
Understand the scenario
You are a Linux system administrator. It would be best if you documented the configuration of an existing server. First, you will document the four major subsystems: CPU, memory, storage, and network. Next, you will document the operating system and applications. Finally, you will document user account information. You will use a default installation of CentOS 7 Linux with the Server with GUI package installed. Non-privileged accounts have been created for you.
Document the processor
For this task, you will document information about your CPU. You will find the CPU model name, speed, and architecture. This information will be found in /proc/cpuinfo and by using the lscpu command.
Document the memory
Here, you will review the details in /proc/meminfo and use the free command to collect important memory details. You will document the total memory for the system, the amount of free memory, and the amount of free swap space.
Document the storage
In this section, you will view the partitions file, use the disk usage command (du) to gather metrics about your disk, and use the file system disk usage command (df) to discover the available free space. You will also learn to use the lsblk, fdisk, and parted commands to view additional information about your system’s storage configuration and utilization.
Document the network
To document the network configuration of your system, you will use the ipaddr command, hostname, firewall-cmd, and ethtool commands. This insight will help you capture the most important network configurations of your system. These details are critical for maintaining configuration control within your environment.
Document the operating system information
In this task, you will learn to use the uname command for listing the kernel version of your OS. You will also use crontab to discover if there are any cron jobs configured for the root user. A cron job is a task that runs automatically according to how they’ve been scheduled. Understanding if there are cron jobs scheduled on your system, will give you insight into potential system utilization concerns or conflicts.
As a system administrator, it is common that you will have to verify the software that is installed on your systems. In this task, you will use systemctl and RPM to look at the properties of some of the software installed on your CentOS 7 virtual machine. The systemctl command allows you to examine the state of “systemd” (the system and service manager). Whereas RPM is a package manager, and you will use it to verify the OpenSSH package that is installed on your system. You will also use it to validate that Samba is not installed.
User account information
Finally, you will examine the /etc/passwd and /etc/login.defs files and the /etc/skel directory to gather information about the user accounts and their configurations.
In this hands-on virtual lab, you will learn where to find several important server information and configuration settings, to help document your environment and maintain configuration and change control. You will also learn how to use basic Linux commands to enumerate this important inventory information. Some of the tasks you will complete are:
- Documented the CPU, memory, storage, and network values.
- Documented the operating system kernel and installation values.
- Documented the OpenSSH values.
- Documented the user account values.
Other Challenges in this series
- GUIDED CHALLENGE: Using Elevated Privileges in Linux
- ADVANCED CHALLENGE: Can You Manage Users in Linux?