Free Linux Foundation Certified System Administrator 2026 Questions and Answers — Questions and Answers
Question 1: What is the proper command to open the download.bz2 archive file and extract its contents?
- uncompress download.bz2
- unpack download.bz2
- unzip2 download.bz2
- bunzip2 download.bz2 (Correct answer)
- unzip download.bz2
Correct answer: bunzip2 download.bz2
Files with the `.bz2` extension are compressed using the bzip2 compression algorithm. The correct command to open and extract the contents of a `download.bz2` archive file is `bunzip2 download.bz2`. This utility is specifically designed to decompress bzip2 archives, typically replacing the compressed file with its uncompressed version.
Question 2: Which of the above commands manages and preloads the keys required for automatic authentication when connecting to other machines over SSH?
- ssh-add
- sshd
- ssh-agent (Correct answer)
- ssh-keygen
Correct answer: ssh-agent
`ssh-agent` is the command that manages and preloads the keys required for automatic authentication when connecting to other machines over SSH. It runs as a background process, holding private keys in memory. Users can add their keys to the agent (using `ssh-add`), and then `ssh-agent` handles the authentication for subsequent SSH connections without requiring the user to re-enter passphrases, enhancing both convenience and security.
Question 3: What is the proper command to open the download.bz2 archive file and extract its contents?
- unpack download.bz2
- unzip download.bz2
- uncompress download.bz2
- bunzip2 download.bz2 (Correct answer)
Correct answer: bunzip2 download.bz2
The `.bz2` file extension indicates that the archive was compressed using the `bzip2` compression utility. To decompress such a file and extract its contents, the corresponding `bunzip2` command is used. Other commands like `unzip` are for `.zip` files, and `uncompress` is for `.Z` files.
Question 4: How can the error output of a command be discarded while writing the normal output to a file?
- command < output > /dev/null
- command >2>file 1&>/dev/null
- command > /dev/null 2&>1 output
- command > discard-error > file
- command >file 2>/dev/null (Correct answer)
Correct answer: command >file 2>/dev/null
In shell commands, `>` redirects standard output (stdout, file descriptor 1) and `2>` redirects standard error (stderr, file descriptor 2). To write normal output to a file, `>file` is used. To discard error output, `2>/dev/null` redirects stderr to `/dev/null`, which is a special device that effectively discards all data written to it.
Question 5: What command will show the final line of the text file foo.txt?
- tail foo.txt
- head -n 1 foo.txt
- tail -n 1 foo.txt (Correct answer)
- last -n 1 foo.txt
Correct answer: tail -n 1 foo.txt
The `tail` command is used to display the end portion of a file. By adding the `-n 1` option, you specify that only the last line of the file should be shown. This combination precisely fulfills the requirement of showing only the final line of `foo.txt`.
Question 6: Which of the following commands prints a listof usernames (first column) and their primary group (fourth column) from the /etc/passwd file?
- split -c 1,4 /etc/passwd
- fmt -f 1,4 /etc/passwd
- paste -f 1,4 /etc/passwd
- cut -d : -f 1,4 /etc/passwd (Correct answer)
Correct answer: cut -d : -f 1,4 /etc/passwd
The `/etc/passwd` file uses a colon (`:`) as a field delimiter. The `cut` command is designed to extract specific fields from lines of text. The `-d :` option sets the delimiter to a colon, and `-f 1,4` specifies that the first (username) and fourth (primary group ID) fields should be printed.
Question 7: Define Ubuntu
- Debian derived, most popular distribution. (Correct answer)
- Gnu's, not unix
- Human readable set of instruction.
- Dominant web server used today.
Correct answer: Debian derived, most popular distribution.
Ubuntu is a popular and widely used Linux distribution that is directly based on Debian, inheriting its robust package management and core system. It is known for its user-friendliness and extensive community support, making it one of the most prevalent Linux distributions globally for both desktop and server use.
What is the proper command to open the download.bz2 archive file and extract its contents?