1/127
What is a process and what are its characteristics?
A running instance of an executable program. Characteristics include allocated memory, security properties (ownership/privileges), one or more execution threads, and a process state.
Explain what happens when a new process starts on a Linux server (excluding PID 1).
A parent process duplicates itself using the fork system call. The child gets a unique PID, inherits properties, and runs exec. The parent waits; when the child exits, it becomes a zombie until the parent reads its status and cleans it up.
What are the FIVE states a process can go through?
Running (R), Sleeping (S - Interruptible), Sleeping (D - Uninterruptible), Stopped (T), Zombie (Z).
What does the command ps aux do?
Displays a snapshot of all active processes across the entire system (including those without a controlling terminal) with details like user, PID, CPU, and memory usage.
What is a job control system on a Linux server?
A shell feature that allows a user to run, pause, resume, and manage multiple commands (jobs) concurrently within a single terminal session.
What is the difference between a background process and a foreground process?
A foreground process controls the terminal, accepts input, and holds up the prompt. A background process runs independently without keyboard input, freeing the prompt.
What command runs "cp hugefile bigfile" in the background?
cp hugefile bigfile &
What command lists currently running background processes?
jobs
Explain the difference between kill -15 PID and kill -9 PID.
kill -15 (SIGTERM) requests a graceful termination so the process can clean up. kill -9 (SIGKILL) forces immediate termination with no cleanup.
What do the commands killall and pkill do?
killall terminates processes matching an exact command name. pkill terminates processes based on pattern matching and advanced criteria (user, terminal, age).
What is the difference between tty and pts/0?
tty indicates a direct physical or virtual system console. pts/0 (pseudo-terminal) indicates a graphical terminal window or a remote SSH session.
What do the commands pgrep and pstree do?
pgrep searches running processes and outputs matching PIDs. pstree displays processes and their parent/child relationships in a tree format.
What is load average?
A kernel measurement of system demand over 1, 5, and 15 minutes, counting processes that are running or waiting for CPU/disk I/O.
What two commands can you use to see the current load average?
uptime and top
What is a Linux daemon?
A background process that runs automatically (typically without a controlling terminal) to perform system tasks or wait for service requests.
What is systemd in RHEL/CentOS?
The core system and service manager (running as PID 1) that handles system initialization, booting, and service management.
When referring to daemons, what is a socket?
An inter-process or network communication channel that a daemon listens on to accept incoming client connections.
What is a service in Linux?
One or more background daemons managed together as a unit, or a one-time task executed during boot or on demand.
What two previous daemon management systems were used before RHEL 7?
System V and LSB init scripts, and Super-servers (inetd / xinetd).
What are four features of the systemd init system?
Faster booting (parallel startup), on-demand daemon starting, automatic dependency management, and process tracking using cgroups.
What does systemctl do and who can use it?
It inspects and manages systemd units. Any user can view status, but only root/sudo can make changes.
What are the three common systemd unit types?
Service (.service), Socket (.socket), and Path (.path).
What is xinetd and inetd?
Older super-servers used prior to systemd that listened on network ports and launched rarely used daemons on-demand.
What are service states in systemd?
Active (running), Inactive (not running), Enabled (starts at boot), and Disabled (does not start at boot).
Write the command to check the status of the sshd service.
systemctl status sshd
Write the command to restart the httpd service.
systemctl restart httpd
Write the command to disable the cups service.
systemctl disable cups
Write the command to enable the sshd service.
systemctl enable sshd
What is the difference between restarting and reloading a service?
Restarting stops the service and starts a fresh instance (new PID). Reloading re-reads configuration files without interrupting active connections.
What do mask and unmask do?
mask links the unit file to /dev/null so it cannot be started at all. unmask removes that block.
What is the difference between ssh and telnet?
ssh encrypts all network traffic. telnet transmits everything in unencrypted plain text.
What is OpenSSH?
The open-source implementation of the SSH protocol suite used to securely log into remote machines and transfer files.
Write the command the user student should use to connect to the Unit10 server.
ssh student@Unit10
What is a public key?
A non-secret cryptographic key that you safely share and place on remote servers (like a padlock).
What is a private key?
A secret cryptographic key kept exclusively on your local machine that pairs with the public key to prove your identity.
What is the absolute path to the file that contains the public keys the user student is storing from previous ssh connections?
/home/student/.ssh/known_hosts
Where are the host keys stored on an ssh server (absolute path)?
/etc/ssh/ (for example, /etc/ssh/ssh_host_rsa_key.pub)
What is the difference between ~/.ssh/known_hosts and /etc/ssh/ssh_known_hosts?
~/.ssh/known_hosts is for a single individual user. /etc/ssh/ssh_known_hosts is a system-wide file for all users.
Explain how SSH key-based authentication works.
Generate a key pair, copy the public key to the server's authorized_keys file. The server issues a cryptographic challenge that only your local private key can solve.
What is the command to create a new public and private key pair and what files are created?
ssh-keygen creates ~/.ssh/id_rsa (private key) and ~/.ssh/id_rsa.pub (public key).
What is the command to securely copy a public key to a remote server?
ssh-copy-id
What is the file an administrator modifies to customize ssh server behavior (absolute path)?
/etc/ssh/sshd_config
What variable prohibits root login and why?
PermitRootLogin no. It prevents brute-forcing the root password and forces admins to use sudo for accountability.
What variable prohibits password logins and why?
PasswordAuthentication no. It eliminates brute-force attacks, requiring attackers to steal a private key.
What command needs to be executed once changes are saved to the sshd configuration file?
systemctl reload sshd
Explain the four-layer TCP/IP model.
Application (software like HTTPS), Transport (TCP/UDP), Network (IP addresses and routing), Link (physical hardware and MAC addresses).
What is the difference between an IPv4 host address and a network address?
The network address identifies the subnet (galaxy); the host address identifies a specific computer (planet). They are split by the subnet mask.
What is a broadcast address?
An address that sends data to every computer on the local network (like a megaphone).
What is the purpose of the routing table on a Linux server?
It acts as the computer's GPS, telling data where to go.
Explain the difference between DHCP and static IP configuration.
DHCP automatically assigns IPs. Static requires manually typing the IP so it never changes.
What is the purpose of the gateway in IP configuration?
It is the exit door used to send data to outside networks (like the internet).
Explain how Linux uses network interfaces compared to network devices.
A device is the physical metal card in the computer. An interface is the software name Linux gives the card.
How are network interfaces defined in Linux?
By their type and physical location.
What is the command to look up the IP configuration on a RHEL server?
ip addr OR nmcli dev status
What is the RHEL command to troubleshoot routes outside your LAN?
traceroute or tracepath
When using the tracepath command, what do each of the lines in the output tell us?
Each line is a router your data hits on the way to its destination, showing the path and wait times.
What does the ss command do and how does it compare to netstat?
ss shows open network connections. It is faster and newer than netstat.
What is NetworkManager in RHEL?
A background program that automatically manages network connections.
What does the nmcli command do?
It is the command-line tool used to control NetworkManager.
What is the command to change the IP address of eth0 to 192.168.0.190/24?
nmcli con mod eth0 ipv4.address 192.168.0.190/24
What is the absolute path to the configuration file for eth1?
/etc/sysconfig/network-scripts/ifcfg-eth1
What do the interface settings bootproto, onboot, and name do?
bootproto gets IP automatically or manually. onboot turns connection on at startup. name is the nickname for the connection.
What does the hostname command do?
Views or temporarily changes the computer's name.
What does the hostnamectl command do?
Permanently changes the computer's name.
What is /etc/hosts?
A local phonebook file that matches IP addresses to names.
What is /etc/resolv.conf?
The file that tells the computer what DNS server to use to translate websites into IP addresses.
What is /etc/hostname?
The file that stores the computer's permanent name.
What is Red Hat Subscription Management?
A toolset that links a RHEL system to a Red Hat account to access software updates, repositories, and support.
What does "Register" mean in RHSM?
Uniquely identifies and links the system to your Red Hat account.
What does "Subscribe" mean in RHSM?
Attaches an active subscription entitlement to the system so it has permission to access updates.
What does "Enable repositories" mean in RHSM?
Turns on specific software repositories from which the system can download packages.
What does "Review and track" mean in RHSM?
Monitors active subscriptions, expiration dates, and which systems consume entitlements.
Write the command to register a RHEL server with RHSM.
subscription-manager register --username=yourname --password=yourpassword
What is a Red Hat Subscription Management entitlement?
A digital certificate/ticket installed on the system proving it is authorized to download updates.
What is the naming convention syntax for an RPM file?
name-version-release.architecture.rpm
What is dnf and what is a dnf package?
dnf is the default package manager in RHEL. A package is the .rpm archive file containing software, configs, and metadata.
What is a repository in dnf?
A centralized local or remote storage location containing RPM packages and metadata.
What does the dnf list command do?
Lists all installed and available packages across enabled repositories.
What does the dnf search command do?
Searches package names and summaries using keywords.
What does the dnf info command do?
Displays detailed metadata (version, size, repo, description) for a package.
What does the dnf provides command do?
Identifies which package supplies a specific file or command path.
What does the dnf update command do?
Upgrades installed packages to the latest available versions.
What does the dnf install command do?
Downloads and installs a package along with required dependencies.
What does the dnf remove command do?
Uninstalls a package and any unneeded dependencies.
What does the dnf grouplist command do?
Displays available and installed package groups bundled for a common purpose.
What does the dnf group install command do?
Installs all mandatory and default packages within a specified software group at once.
What does the dnf history command do?
Displays a transaction log of past dnf install, update, and removal actions.
What does the dnf repolist all command do?
Lists all configured repositories, showing both enabled and disabled ones.
What does the dnf config-manager command do?
Enables or disables software repositories and manages dnf configuration options.
What does the rpm -q command do?
Queries the local RPM database to verify if a package is installed and display its version.
What does the rpm -q -p command do?
Queries an uninstalled local .rpm package file.
What does the rpm -q -f command do?
Identifies which installed RPM package owns a specific file on the system.
What does the rpm -q -l command do?
Lists all files installed by a specified RPM package.
What does the rpm -q -c command do?
Lists only the configuration files included in a package.
What does the rpm -q -d command do?
Lists only the documentation and man-page files included in a package.
What does the rpm -q --scripts command do?
Displays the pre-install, post-install, pre-uninstall, and post-uninstall shell scripts embedded in a package.
Define Linux file system and its advantage.
The logical structure on a storage device to organize files. Linux unifies all separate drives into a single hierarchical directory tree starting at root (/).
What does the df -H command do?
Reports total, used, and available disk space on all mounted file systems in human-readable decimal (SI) units.
What does the du -h /var/log command do?
Calculates and displays the disk space used by files and subdirectories inside /var/log in human-readable format.
What is the /dev/sdb3 device on a Linux server?
The third partition (3) on the second SATA/SCSI/USB storage drive (sdb).