Linux commands
Test your knowledge of Linux command line fundamentals including file permissions, shell operators, filesystems, cron jobs, and bash basics.
Questions
Which regular expression would grab a number at the beginning of a line?
- $[1..10]
- ^[1..10]
- $\D
- ^\d
What is the symbol for a regular file?
- d
- s
- c
- -
What is the third step in the boot process?
- BIOS
- GRUB
- POST
- INIT
Metadata about file system, critical for operations.
- Superblock
- Init
- Crontab
- Tmp
chmod 644 passwd What are permissions for the passwd file?
- User=rw Group=r Other=r
- User=r Group=r Owner=rw
- User=rwx Group=wite Other=write
- Add current user as owner for the file.
What pseudo file system shows information about process AND some hardware?
- /proc
- /sys
- /tmp
- /dev
Execute next command if previous command false (of fails) is an example of what?
- AND (&&)
- NOT
- XOR
- OR (||)
Execute next command if previous command true (or successful) is an example of?
- AND
- XOR
- OR
- NONE
Using cat crontab when does cron.weekly run? 57 00 * * 7 [USER] [COMMAND]
- Every Sunday at 00:57
- Every Saturday at 00:57
- Every day at 12:57pm.
- Anytime every Sunday.
Using cat crontab when does cron.daily run? 25 6 * * * [USER] [COMMAND]
- Every Sunday at 0625.
- Every day at 1852.
- Every Saturday at 1825.
- Every day at 0625.
ls -l shows output -rwx-rw-r--. Which answer shows the correct permissions?
- user has rwx, group has rw, other has r
- other has rwx, group has rw, owner has r
- user has rwx, guest has rw, owner has r
- User has full permissions, everyone else has execute.
What is main difference between interactive and non-interactive shells?
- User input
- Run levels
- Commands
- Crontab
What is the order of evaluation in bash?
- History, Variables, ARP Table, RAM, Disk
- PEMDAS
- Redirections, Aliases, Para Expansion, Explorer.exe
- Redirection, Aliases, Para Expansion, CMD Subsitution, Shell
Which command will change file owner AND group?
- Chmod
- Chown
- Net user
- Chgrp
What command will change file timestamps?
- Touch
- Change
- Cp
- Rm
In bash what symbolizes a root prompt?
- #
- &
- $
- %
In bash what symbolizes a user prompt?
- $
- %
- #
- &
What is the default shell for most Linux distributions?
- C Shell
- Korn Shell
- Bash
- Fish