Unlock hundreds more features
Save your Quiz to the Dashboard
View and Export Results
Use AI to Create Quizzes and Analyse Results

Sign inSign in with Facebook
Sign inSign in with Google

Linux Quiz: Check Your Unix Basics and Command Line Skills

Quick, free Linux commands quiz. Instant results with brief explanations.

Editorial: Review CompletedCreated By: Sarah JonesUpdated Aug 28, 2025
Difficulty: Moderate
2-5mins
Learning OutcomesCheat Sheet
Paper art quiz illustration with Linux and Unix icons distributions commands remote tools on dark blue background

This Linux quiz helps you check your Unix basics, core commands, files, permissions, and shell navigation. Answer quick questions and see instant results with short explanations; then build on your skills with our Git quiz, programming quiz, or computer basics quiz. Great for exam prep or a quick refresh.

Which command prints the current working directory?
cwd
whereami
pwd
path
undefined
Which package manager is default on Debian-based distributions?
APT
Pacman
YUM
Zypper
undefined
Which command sends a single ICMP echo request to a host and then exits?
ping -c 1 host
icmp host 1
ping host --once
trace host 1
undefined
What command changes the owner of a file?
chgrp
chown
ownmod
chmod
undefined
Which command shows running processes in a dynamic, updating view?
ps aux
jobs
watch ps
top
undefined
What is the purpose of the PATH environment variable?
It defines library search paths
It sets the default editor
It lists directories searched for executables
It stores the user's home directory path
undefined
Which command extracts a gzipped tar archive named backup.tar.gz into the current directory?
tar -xzf backup.tar.gz
gunzip backup.tar.gz
tar -czf backup.tar.gz
untar backup.tar.gz
undefined
In Linux file permissions, what does the first character in a long listing (ls -l) represent?
Execute bit for others
Group permissions
File type
Owner permissions
undefined
What does the shebang (#!) at the top of a script specify?
The script author
The interpreter to execute the script
The script encoding
The working directory
undefined
Which file typically stores secure hashed user passwords on modern Linux systems?
/etc/shadow
/etc/passwd
/etc/login.defs
/var/shadow
undefined
Which init system uses systemctl to manage services on many modern Linux distributions?
systemd
runit
Upstart
SysVinit
undefined
In SSH, which file typically stores a user's public keys authorized to log in?
~/.ssh/id_rsa
/etc/ssh/ssh_config
~/.ssh/known_hosts
~/.ssh/authorized_keys
undefined
What does chmod 754 file set for permissions?
rwx for owner, rw- for group, r-- for others
rw- for owner, r-- for group, --- for others
rwx for owner, r-x for group, r-- for others
rwx for owner, --- for group, r-x for others
undefined
Which command copies files over SSH while preserving timestamps and using delta transfers?
rsync -az -e ssh source/ host:dest/
scp -R source/ host:dest/
ftp source/ host:dest/
sftp source/ host:dest/
undefined
What does the sticky bit on a directory do (e.g., chmod +t /tmp)?
Marks files as temporary
Encrypts files in the directory
Prevents execution of files in the directory
Prevents users from deleting files they do not own
undefined
Which command appends both stdout and stderr of cmd to a file log.txt?
cmd | tee -a log.txt
cmd 2>> log.txt > log.txt
cmd > log.txt 2>1
cmd >> log.txt 2>&1
undefined
Which log command shows systemd journal entries across boots?
journalctl -b -1
dmesg -a -1
syslogctl --prev
logread -p
undefined
SELinux enforces which primary security model on Linux?
Mandatory Access Control (MAC)
Role-Based Access Only (RBAO)
Discretionary Access Control (DAC)
Capability-Only Model (COM)
undefined
Which utility creates and manages logical volumes on Linux?
mdadm
LVM (pvcreate, vgcreate, lvcreate)
parted only
raidctl
undefined
Which option to tar preserves ownership, permissions, and timestamps when extracting as root?
-P only
--xattrs --same-owner -p
--keep-all
--preserve=allusers
undefined
0

Study Outcomes

  1. Understand Core Linux & Unix Distributions -

    Differentiate between major distros like Ubuntu, CentOS, and Debian, as introduced in the intro to linux answer quiz.

  2. Apply Essential Command-Line Operations -

    Perform file navigation, directory management, and text editing using commands like ls, cd, cp, and nano in the linux basics quiz context.

  3. Identify and Manage File Permissions -

    Use chmod, chown, and ls -l to interpret and adjust file permissions and ownership on Unix systems.

  4. Demonstrate Secure Remote Access -

    Establish SSH connections, transfer files with scp, and understand key-based authentication methods.

  5. Analyze and Troubleshoot Common CLI Errors -

    Recognize typical command errors, parse error messages, and apply debugging strategies to resolve issues.

  6. Evaluate Fundamental Processes and Services -

    Use ps, top, and systemctl to monitor processes, manage services, and grasp basic process control concepts.

Cheat Sheet

  1. Understanding Linux Distributions -

    Knowing how distributions differ is key to the intro to linux answer. Debian (apt), Red Hat (yum/dnf), Arch (pacman) and SUSE (zypper) each cater to unique use cases; use the "DEAR" mnemonic (Debian, Enterprise, Arch, RedHat) to recall. Official docs from The Linux Foundation offer in-depth comparisons.

  2. Filesystem Hierarchy Standard (FHS) -

    The FHS, maintained by the Linux Foundation, defines directory roles: /etc for config, /home for users, /var for logs and /usr for apps. Remember "Every Home Value Underpins System" to map common paths. This structure is crucial for both troubleshooting and scripting.

  3. Core Command-Line Tools -

    Master commands like ls, cd, pwd, cp, mv and rm - you'll often see them on a basic linux commands quiz. Practice with flags (e.g., ls -lha shows hidden details) and chaining with pipes (e.g., ps aux | grep ssh). The Linux Documentation Project provides examples and use cases.

  4. File Permissions and Ownership -

    Understand chmod's numeric modes (r=4, w=2, x=1) to set rights, and chown to change owners; this often appears on linux basics quiz sections. A quick mnemonic is "421 Rule" for read, write, execute bits. Refer to official GNU documentation for practical scenarios.

  5. Remote Access with SSH -

    SSH (Secure Shell) is essential in a unix fundamentals quiz or linux and unix quiz format - use ssh user@host for login and scp for file transfers. Set up key-based auth with ssh-keygen for passwordless, secure sessions. The OpenSSH manual is the authoritative resource.

Powered by: Quiz Maker