← All LFCS Certification Flashcard Decks

General Practice Test Flashcards

7 cards from real LFCS Certification practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 General Practice Test flashcards as text
  1. What is the proper command to open the download.bz2 archive file and extract its contents?

    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.

  2. Which of the above commands manages and preloads the keys required for automatic authentication when connecting to other machines over SSH?

    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.

  3. What is the proper command to open the download.bz2 archive file and extract its contents?

    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.

  4. How can the error output of a command be discarded while writing the normal output to a file?

    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.

  5. What command will show the final line of the text file foo.txt?

    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`.

  6. Which of the following commands prints a listof usernames (first column) and their primary group (fourth column) from the /etc/passwd file?

    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.

  7. Define Ubuntu

    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.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. docs.linuxfoundation.org — Renewal, score release, exam format, passing score · verified Oct 2026
  2. training.linuxfoundation.org — Test delivery, eligibility, fees, registration deadline, time limit, score validity · verified Oct 2026