Linux commands

Test your knowledge of Linux command line fundamentals including file permissions, shell operators, filesystems, cron jobs, and bash basics.

19 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which regular expression would grab a number at the beginning of a line?

  1. $[1..10]
  2. ^[1..10]
  3. $\D
  4. ^\d
Question 2 Multiple Choice (Single Answer)

What is the symbol for a regular file?

  1. d
  2. s
  3. c
  4. -
Question 3 Multiple Choice (Single Answer)

What is the third step in the boot process?

  1. BIOS
  2. GRUB
  3. POST
  4. INIT
Question 4 Multiple Choice (Single Answer)

Metadata about file system, critical for operations.

  1. Superblock
  2. Init
  3. Crontab
  4. Tmp
Question 5 Multiple Choice (Single Answer)

chmod 644 passwd What are permissions for the passwd file?

  1. User=rw Group=r Other=r
  2. User=r Group=r Owner=rw
  3. User=rwx Group=wite Other=write
  4. Add current user as owner for the file.
Question 6 Multiple Choice (Single Answer)

What pseudo file system shows information about process AND some hardware?

  1. /proc
  2. /sys
  3. /tmp
  4. /dev
Question 7 Multiple Choice (Single Answer)

Execute next command if previous command false (of fails) is an example of what?

  1. AND (&&)
  2. NOT
  3. XOR
  4. OR (||)
Question 8 Multiple Choice (Single Answer)

Execute next command if previous command true (or successful) is an example of?

  1. AND
  2. XOR
  3. OR
  4. NONE
Question 9 Multiple Choice (Single Answer)

Using cat crontab when does cron.weekly run? 57 00 * * 7 [USER] [COMMAND]

  1. Every Sunday at 00:57
  2. Every Saturday at 00:57
  3. Every day at 12:57pm.
  4. Anytime every Sunday.
Question 10 Multiple Choice (Single Answer)

Using cat crontab when does cron.daily run? 25 6 * * * [USER] [COMMAND]

  1. Every Sunday at 0625.
  2. Every day at 1852.
  3. Every Saturday at 1825.
  4. Every day at 0625.
Question 11 Multiple Choice (Single Answer)

ls -l shows output -rwx-rw-r--. Which answer shows the correct permissions?

  1. user has rwx, group has rw, other has r
  2. other has rwx, group has rw, owner has r
  3. user has rwx, guest has rw, owner has r
  4. User has full permissions, everyone else has execute.
Question 12 Multiple Choice (Single Answer)

What is main difference between interactive and non-interactive shells?

  1. User input
  2. Run levels
  3. Commands
  4. Crontab
Question 13 Multiple Choice (Single Answer)

What is the order of evaluation in bash?

  1. History, Variables, ARP Table, RAM, Disk
  2. PEMDAS
  3. Redirections, Aliases, Para Expansion, Explorer.exe
  4. Redirection, Aliases, Para Expansion, CMD Subsitution, Shell
Question 14 Multiple Choice (Single Answer)

Which command will change file owner AND group?

  1. Chmod
  2. Chown
  3. Net user
  4. Chgrp
Question 15 Multiple Choice (Single Answer)

What command will change file timestamps?

  1. Touch
  2. Change
  3. Cp
  4. Rm
Question 16 Multiple Choice (Single Answer)

In bash what symbolizes a root prompt?

  1. #
  2. &
  3. $
  4. %
Question 17 Multiple Choice (Single Answer)

In bash what symbolizes a user prompt?

  1. $
  2. %
  3. #
  4. &
Question 18 Multiple Choice (Single Answer)

What is the default shell for most Linux distributions?

  1. C Shell
  2. Korn Shell
  3. Bash
  4. Fish