Linux Essentials Finding Your Way practice questions
7-day money-back guarantee — full refund within 7 days of purchase if you've completed under 20% of the questions. See pricing →
Certifications Tools Flashcards Career Paths Exam Guides Blog Pricing For Teams About

Linux Essentials Finding Your Way on a Linux System: 199 practice questions

Linux Essentials 199 questions 12 shown free

12 of the 199 Finding Your Way on a Linux System questions in the Certsqill Linux Essentials bank, shown in full below. Each one carries an explanation for every option, not just the correct one — the wrong answers are where the marks go.

Preparing for Linux Essentials? Take the free 5-min readiness check →

1. red blue: What is the standard output?

Medium
Run this complete snippet in Bash with no startup files. Show standard output excluding the final newline.label='red blue' printf '%s\n' "$label"What is the standard output?
  1. $label
    The dollar expression is expanded because it appears inside double quotes, not single quotes.
  2. red blue blue
    The variable contains only one value, so expansion cannot duplicate the word blue.
  3. red blue ✓
    Double quotes expand label while preserving its embedded space as part of one printf argument.
  4. red
    The quoted expansion preserves the space, so the value is not reduced to its first word.
The trap
Treats double quotes as literal single quotes. Invents duplication during ordinary parameter expansion. Overlooks that double quotes preserve embedded spaces.

Double quotes expand the variable while preserving the space inside its value.

2. man 5 passwd: Which command selects the correct manual section?

Medium
On a development laptop, the administrator wants the manual page describing the `/etc/passwd` file format, not the `passwd` command. Which command selects the correct manual section?
  1. man 5 passwd ✓
    Section 5 contains file formats, so this explicitly selects the passwd file-format manual page.
  2. man 1 passwd
    Section 1 documents user commands, so this selects the passwd command documentation.
  3. man -k passwd
    The -k search finds matching manual descriptions rather than opening a specific file-format page.
  4. man passwd
    Without a section number, man chooses according to its normal search order, not explicitly file format.
The trap
Assumes the default section is always the file format. Confuses command section one with file section five. Confuses manual searching with section selection.

Use section 5 for file formats: `man 5 passwd`.

3. cd ../notes: What should they run instead?

Hard
Assume Bash is running in `/home/lee/projects`, and both `/home/lee/notes` and `/home/lee/projects/notes` exist as directories. A student runs `cd notes` but needs to reach `/home/lee/notes`. What should they run instead?
  1. cd /notes
    `/notes` is an absolute path under the filesystem root, not under `/home/lee`.
  2. cd ~/projects/notes
    This names `/home/lee/projects/notes`, not `/home/lee/notes`.
  3. cd ../notes ✓
    From `/home/lee/projects`, `..` refers to `/home/lee`; adding `notes` reaches `/home/lee/notes`.
  4. cd ./notes
    `./notes` refers to `notes` inside the current `/home/lee/projects` directory.
The trap
Confuses current-directory notation with the parent directory. Builds the unwanted projects component into the path. Confuses the filesystem root with the user’s home directory.

Use `..` to leave `projects`, then enter `notes`.

4. cp report.txt archive/: Which command does that?

Easy
In a research group, `report.txt` exists in the current directory and `archive/` exists as a directory. The group wants a duplicate in `archive/` while retaining the original. Which command does that?
  1. mv report.txt archive/
    mv relocates the file into archive, so the original pathname no longer remains.
  2. mkdir archive/report.txt
    mkdir attempts to create a directory, not duplicate the existing regular file.
  3. cp report.txt archive/ ✓
    cp creates a second copy in archive while leaving the original report.txt unchanged.
  4. rm report.txt archive/
    rm removes names rather than creating a duplicate, and archive is a directory.
The trap
Confuses moving with making a duplicate. Confuses deletion with copying. Confuses directory creation with file copying.

Use `cp` to duplicate the file and preserve the original pathname.

5. alpha beta: What is the standard output?

Hard
Run this complete snippet in Bash with no startup files. Show standard output excluding the final newline.label='alpha beta' printf '%s\n' "$label"What is the standard output?
  1. label=alpha beta
    The assignment itself is not printed; printf expands the variable and prints only its value.
  2. beta
    The variable contains both words, so printf receives and prints the complete value.
  3. alpha
    The quoted variable expansion preserves the embedded space; it does not discard the second word.
  4. alpha beta ✓
    Single quotes assign the two-word value literally, and double quotes preserve it as one printf argument.
The trap
Assumes variable expansion splits quoted values at spaces. Mistakes the final word for the complete variable value. Confuses assignment syntax with the value printed by printf.

Quoted assignment and expansion preserve the complete two-word value.

6. man -k password: On a GNU/Linux system with the standard manual database installed, which command searches man

Medium
On a GNU/Linux system with the standard manual database installed, which command searches manual-page descriptions for the keyword `password`?
  1. man -k password ✓
    The `-k` option searches manual descriptions for a keyword and displays matching manual entries.
  2. man password
    This opens a manual page named password rather than searching descriptions for related entries.
  3. info password
    This opens an Info document named password when available, without searching manual descriptions.
  4. man -f password
    The `-f` option requests a brief description of a named manual page.
The trap
Confuses brief-description lookup with keyword search. Confuses navigable Info documentation with manual keyword search. Confuses opening one manual page with keyword searching.

`man -k` searches manual-page descriptions by keyword.

7. cd: Which command moves to its parent directory with the least disruption?

Medium
In Bash, your current directory is `/home/student/projects/demo`. Which command moves to its parent directory with the least disruption?
  1. cd ~
    This changes to the current user's home directory, not necessarily the current directory's immediate parent.
  2. pwd ..
    `pwd` reports the current directory and does not change directories or accept a destination.
  3. cd .. ✓
    The special path `..` names the current directory's parent, so this changes to `/home/student/projects`.
  4. cd /
    This changes to the filesystem root, moving much farther than the requested single parent level.
The trap
Confuses reporting the directory with changing the directory. Jumps to root instead of moving one directory upward. Confuses the home-directory shortcut with the parent shortcut.

`..` denotes the parent directory in a relative path.

8. cp -r project backup: Which command copies the directory and its contents to `backup` while leaving `project`

Medium
In Bash, the current directory is `/home/student`; `/home/student/project` exists as a directory containing files, and `/home/student/backup` does not exist. Which command copies the directory and its contents to `backup` while leaving `project` in place?
  1. mv project backup
    `mv` moves or renames `project` instead of retaining the original directory as a copy.
  2. cp -r project backup ✓
    Recursive `cp` copies the directory and its contents to the new `backup` destination while retaining `project`.
  3. cp project backup
    Without recursive copying, `cp` cannot copy a directory and its contents as requested.
  4. mkdir project backup
    `mkdir` creates directories but does not copy the existing files or directory contents.
The trap
Creates names without copying data. Moves the source rather than copying it. Omits the option needed for a directory tree.

Recursive `cp` copies a directory and its contents.

9. north south: What is the standard output?

Hard
Run this complete snippet in Bash with no startup files. Show standard output excluding the final newline.label='north south' printf '%s\n' "$label"What is the standard output?
  1. label=north south
    The assignment is not printed; printf outputs the expanded value stored in label.
  2. south
    The expansion prints the complete variable value, not only its final word.
  3. north
    The variable contains two words, and quoting prevents the embedded space from separating or removing the second.
  4. north south ✓
    The single-quoted assignment preserves both words, and the quoted expansion prints them with their space.
The trap
Mistakes the final word for the complete value. Confuses the assignment statement with its output. Assumes only the first word survives variable expansion.

The quoted value expands to the complete text `north south`.

10. The manual searches forward for `shell`: What happens?

Medium
On a GNU/Linux workstation, `man` uses the `less` pager. You run `man passwd`, then type `/shell` and press Enter. What happens?
  1. The manual searches forward for `shell`. ✓
    In the `less` pager, `/pattern` searches forward for the specified text.
  2. The manual displays the next manual page.
    Manual-page navigation is not performed by entering a slash followed by a search term.
  3. The command searches every file named `shell`.
    The search occurs inside the displayed manual text, not across filesystem filenames.
  4. The manual closes immediately.
    The `q` key quits the `less` pager; entering a slash begins a search instead.
The trap
Confuses pager text search with filesystem filename search. Confuses text searching with moving between manual pages. Confuses the search command with the pager quit command.

In the `less` pager, `/shell` searches forward within the displayed manual.

11. `cd ~` normally changes to `/home/volunteer`: Select TWO true statements about these commands.

Easy
In Bash, assume `/home/volunteer` is the user's home directory and no directory named `~` exists in the current directory. Select TWO true statements about these commands.

Select two. More than one option is correct — every correct one is ticked below.

  1. `cd ~` normally changes to `/home/volunteer`. ✓
    An unquoted tilde at the start of a word expands to the current user's home directory.
  2. `cd '~'` passes a literal tilde as the directory name. ✓
    Single quotes prevent tilde expansion, so Bash passes the character `~` literally.
  3. `cd "~"` expands the tilde to the home directory.
    Double quotes preserve the tilde literally; tilde expansion occurs when it is unquoted at the beginning of a word.
  4. `cd '~'` ignores the argument and uses the home directory.
    The single-quoted argument remains literal, so Bash attempts to enter a directory actually named `~`.
  5. `cd ~` changes to the filesystem root.
    The filesystem root is `/`; an unquoted tilde expands to the current user's home directory.
The trap
Assumes double quotes perform tilde expansion. Assumes quoting changes the argument into a home shortcut. Confuses tilde home expansion with the root path.

An unquoted tilde expands at word start; a quoted tilde remains literal.

12. rmdir logs: Which command removes this empty directory?

Easy
In Bash, `logs` exists in the current directory and is empty. Which command removes this empty directory?
  1. touch logs
    `touch` updates or creates files; it does not remove an existing directory.
  2. cd logs
    `cd` enters the directory and does not remove it from the filesystem.
  3. rm logs
    Plain `rm` removes files, but it does not remove a directory without a recursive directory option.
  4. rmdir logs ✓
    `rmdir` removes directories when they are empty, matching the stated directory condition.
The trap
Confuses timestamp creation with directory removal. Omits the directory-specific command or recursive option. Confuses entering a directory with deleting it.

`rmdir` removes an empty directory.

187 more Finding Your Way on a Linux System questions

The remaining 187 questions in this domain are part of the full Linux Essentials bank — 885 questions, every option explained. Start with the free five-minute check and see your score per domain.

Test your Linux Essentials readiness — free

Other Linux Essentials domains

Part of the Certsqill Linux Essentials question bank · Finding Your Way on a Linux System · Every answer, right and wrong, comes with its own explanation.