VMware ESXi and vSphere Cluster Management
Linux Fundamentals Knowledge Quiz
Test foundational Linux knowledge with a self-paced quiz covering commands, cron, Bash, processes, permissions, networking, boot diagnostics, and storage.
This self-paced Linux fundamentals quiz is designed for beginners, introductory Linux students, and junior system administrators. It is not timed. Work through the questions, record your answers, and then use the answer key to calculate your score.
A score of 80% or higher is a pass. If you do not pass, review foundational Linux topics such as command-line usage, files and directories, permissions, users, and basic networking before attempting the quiz again.
Quiz instructions and scoring
- Answer every question without using the answer key.
- Give yourself one point for each correct answer.
- Divide your points by the total number of questions and multiply by 100.
- A passing result is 80% or higher.
Result states: A passing result means your answers demonstrate a suitable foundation for the topics tested. A result below 80% means you should study the relevant fundamentals, repeat the practical examples, and retry the assessment.
Quiz questions
Job scheduling
- Which scheduler is intended for recurring jobs on systems that may not run continuously?
- A. cron
- B. anacron
- C. dmesg
- D. renice
- What is a crontab used for?
- A. Defining recurring scheduled tasks
- B. Storing password hashes
- C. Displaying kernel messages
- D. Creating swap space
- In the system-wide entry below, what does the entry run, and under which account?
15 2 * * 1 root /usr/local/sbin/weekly-cleanup- A. At 2:15 every Monday as root
- B. At 15:02 every day as root
- C. At 2:15 on the first day of every month as root
- D. Every 15 minutes as the weekly-cleanup user
- What does a wildcard in a cron field mean? For example, what does the first
*represent in* 4 * * *?- A. No value is accepted
- B. Every permitted value for that field
- C. The current user
- D. The command is disabled
Shells and Bash scripts
- Which shell is widely used as a default interactive shell on many Linux distributions?
- A. Bash
- B. PowerShell only
- C. BIOS
- D. cron
- What is the purpose of this line at the beginning of an executable script?
#!/bin/bash- A. It declares the interpreter that should run the script
- B. It comments out the entire script
- C. It changes the file owner
- D. It starts a cron daemon
- Which statement correctly distinguishes a shell name from an interpreter path?
- A. Bash is a shell name;
/bin/bashis an executable path - B. Bash is always a directory;
/bin/bashis a user account - C. They are both configuration files
- D. Neither can be used in a script
- A. Bash is a shell name;
Processes and priority
- What does a nice value represent?
- A. A process scheduling preference
- B. The process's network address
- C. The file's owner
- D. The amount of disk space used
- In general, what is the relationship between a higher numeric nice value and scheduling priority?
- A. A higher nice value generally means a lower scheduling priority
- B. A higher nice value always means a higher priority
- C. Nice values apply only to files
- D. Nice values terminate processes
- Which command changes the nice value of an already running process?
- A. ps
- B. renice
- C. pwd
- D. tar
Archives and account data
- What is the primary purpose of
tar?- A. Packaging files and directories into an archive
- B. Changing a process priority
- C. Resolving DNS records
- D. Displaying the current directory
- Which statement about archiving and compression is correct?
- A. Archiving packages files; compression reduces their encoded size. They can be used together.
- B. Archiving and compression are exactly the same operation.
- C. Compression always creates a filesystem.
- D. Tar can only process text files.
- Which file contains protected password hashes and password-aging information?
- A.
/etc/passwd - B.
/etc/shadow - C.
/etc/hosts - D.
/proc
- A.
- Why is access to password hash information restricted?
- A. Hashes and aging data are sensitive authentication information that could support offline password attacks
- B. The file contains only printer settings
- C. The file is required only during boot
- D. It stores network interface hardware details
Permissions and navigation
- What does
umaskcontrol?- A. Default permission restrictions applied when new files and directories are created
- B. Permissions on every existing file immediately
- C. The current working directory
- D. Kernel boot messages
- Which command displays the current working directory?
- A. pwd
- B. passwd
- C. lp
- D. ifconfig
Virtual filesystems and diagnostics
- What is
/proc?- A. A kernel-provided virtual filesystem exposing live process and system information
- B. A normal user home directory
- C. A compressed archive
- D. A permanent swap partition
- What does
uname -agenerally display?- A. Broad kernel, machine, and operating-system identification details
- B. Only the contents of
/etc/hosts - C. All running processes with their nice values
- D. The contents of a tar archive
- What is
dmesgprimarily used to inspect?- A. Kernel ring-buffer messages, including device detection and driver events
- B. User password hashes
- C. Cron field definitions
- D. File creation masks
Networking and storage
- Which statement about Linux interface commands is correct?
- A.
ifconfigis a traditional utility;ipis the modern replacement on many systems - B.
ipconfigis the standard Linux replacement forifconfig - C.
ifconfigedits password data - D.
ipis used only to create archives
- A.
- What does
/etc/hostsprovide?- A. Local static mappings between IP addresses and hostnames
- B. The default network gateway only
- C. A list of installed hardware
- D. Automatic wireless discovery
- What is swap?
- A. Disk-backed virtual memory used when physical RAM is under pressure
- B. A bootloader configuration file
- C. A type of primary partition only
- D. A network interface
Answer key and explanations
- B. Cron is designed for recurring jobs at specified times. Anacron is useful for periodic jobs on systems that may be powered off when a scheduled time arrives.
- A. A crontab is a schedule file or command interface for defining cron jobs.
- A. System crontab fields are minute, hour, day of month, month, day of week, user, and command. The job runs at 02:15 every Monday as
root. - B. A wildcard means every permitted value in that field. The example runs every minute during hour 4, subject to the other fields.
- A. Bash, the Bourne Again Shell, is a common command interpreter and scripting language.
- A. A shebang begins with
#!and tells the operating system which interpreter to use when the script is executed. - A. “Bash” names the shell;
/bin/bashidentifies an executable interpreter path. A system may use a different valid path, so verify it when troubleshooting. - A. A nice value expresses a scheduling preference associated with a process.
- A. Increasing niceness generally makes a process more willing to yield CPU time, resulting in lower scheduling priority. Exact behavior also depends on the scheduler and workload.
- B. Use
reniceto change an existing process's nice value. Usepsto inspect processes, not to change their priority. - A. Tar packages multiple files and directories into one archive.
- A. Archiving combines files into a package; compression reduces size. Common names include
.tar,.tar.gz,.tgz,.tar.bz2, and.tar.xz. - B.
/etc/shadowis the restricted password and password-aging database./etc/passwdcontains general account information and normally does not contain the password hash. - A. Restricting hashes reduces exposure of authentication data and makes offline cracking attempts harder.
- A.
umaskinfluences the default permissions of newly created filesystem objects. It does not directly change permissions on existing files; use tools such aschmodfor that. - A.
pwdprints the shell's present working directory. - A.
/procis a virtual filesystem populated by the kernel. Its entries represent live runtime information rather than ordinary files stored permanently on a disk. - A.
uname -aprints a broad set of kernel and operating-system identity details. - A.
dmesgdisplays kernel ring-buffer messages useful for reviewing initialization, device detection, drivers, and boot-related events. Distribution-specific logs may provide additional information. - A.
ifconfigis a traditional Linux utility. Theipsuite, such asip addr show, is preferred on many current distributions. Windows usesipconfig, which is a different command. - A. The hosts file supplies local static name mappings. It is distinct from DNS records, gateway configuration, hardware inventory, and automatic discovery.
- A. Swap can be a partition or a file. It provides disk-backed virtual memory when RAM is constrained, although heavy swap activity is usually much slower than using RAM.
Reference: cron scheduling
A user crontab commonly follows this pattern:
minute hour day-of-month month day-of-week commandA system-wide file such as /etc/crontab includes an additional account field:
minute hour day-of-month month day-of-week user command| Field position | Meaning | Valid values | Wildcard behavior |
|---|---|---|---|
| Minute | Minute of the hour | 0–59 | * means every minute |
| Hour | Hour of the day | 0–23 | * means every hour |
| Day of month | Calendar day | 1–31 | * means every day of the month |
| Month | Calendar month | 1–12 or names supported by the implementation | * means every month |
| Day of week | Weekday | 0–7 or names supported by the implementation; 0 and 7 commonly represent Sunday | * means every weekday value |
| User field in system crontab | Account used to execute the command | For example, root or another account | Not a schedule field |
| Command field | Command or script to execute | A valid command line | Not a schedule field |
For example, 30 1 * * 0 root /usr/local/sbin/report runs at 01:30 every Sunday as root in a system crontab. When a task does not run, check field order, whether the file is a user or system crontab, service status, logs, absolute command paths, and permissions.
Practical command examples
Create and run a Bash script
printf '#!/bin/bash\necho "Linux practice"\n' > practice.sh
chmod +x practice.sh
./practice.shThe shebang selects Bash. If execution fails, verify the interpreter path, execute permission, and line endings. A file created on Windows may contain carriage returns that break the shebang.
Inspect and adjust a process
ps -eo pid,ni,comm
renice -n 5 -p 1234
ps -p 1234 -o pid,ni,commThe first command displays process identifiers and nice values. renice changes the value for PID 1234, and the final command confirms the result. Changing priority may require appropriate ownership or elevated privileges; raising priority is subject to administrative limits.
Create and inspect an archive
tar -cf project.tar project/
tar -tf project.tar
tar -xf project.tar -C /tmp/project-copyThe first command creates an uncompressed archive, the second lists its contents, and the third extracts it. Compression utilities can be paired with tar to produce formats such as .tar.gz or .tar.xz.
Inspect identity, runtime data, and memory
pwd
uname -a
cat /proc/uptime
free -h
swapon --showpwd reports location in the filesystem, uname -a reports system identity, and /proc/uptime exposes live kernel information. free -h shows RAM and swap totals, while swapon --show lists active swap areas.
Inspect networking and local name mappings
ifconfig
ip addr show
cat /etc/hostsifconfig may be unavailable on newer installations; use ip addr show as the preferred alternative. The hosts file can supply a local mapping that affects name lookup before or alongside DNS, depending on the system's resolver configuration.
Command identification reference
| Command | Primary purpose | Related concept | Common misconception |
|---|---|---|---|
| anacron | Run periodic jobs on systems that may not be continuously powered on | Job scheduling | It is not identical to a cron entry that must run at an exact minute |
| renice | Change the nice value of a running process | Process scheduling | ps inspects processes but does not change their priority |
| tar | Create, list, and extract archives | Archiving and compression | Tar archives are not automatically compressed |
| umask | View or set the default creation permission mask | Permissions | It does not modify permissions on existing files |
| pwd | Print the current working directory | Filesystem navigation | It is not an account or printing command |
| uname -a | Display broad kernel and OS identity details | System information | It does not show all hardware inventory |
| dmesg | Display kernel ring-buffer messages | Boot and device diagnostics | It is not a general application log viewer |
| ifconfig | Display traditional network interface settings | Networking | It is not the Windows ipconfig command |
| ip | Inspect and configure modern Linux network objects | Networking | It is not limited to displaying IPv4 addresses |
System files and virtual filesystems
| Path | Purpose | Typical contents | Access or safety considerations |
|---|---|---|---|
/etc/crontab | System-wide recurring job configuration | Schedule fields, execution account, and command | Edit carefully; syntax errors can prevent jobs from running |
/etc/shadow | Protected account-password and aging database | Password hashes, expiration, and aging fields | Restrict access; do not expose or casually edit authentication data |
/etc/hosts | Local hostname-to-address mapping | IP addresses, hostnames, and aliases | Incorrect entries can send local traffic to the wrong address |
/proc | Kernel-provided virtual filesystem | Process details, uptime, memory, devices, and runtime settings | Contents are live and may change; not all entries are ordinary disk files |
Linux networking command comparison
| Tool | Platform or era | Typical use | Current relevance |
|---|---|---|---|
| ifconfig | Traditional Linux and Unix utility | Display or configure interfaces | Legacy; may require the net-tools package |
| ip | Modern Linux utility suite | Inspect and configure addresses, links, routes, and other network objects | Preferred on many current distributions |
| ipconfig | Windows command | Display Windows IP configuration | Do not substitute it for Linux ip |
Troubleshooting checklist
- Scheduled task: Check minute-hour ordering, user versus system crontab format, cron service status, logs, absolute paths, and permissions.
- Bash script: Validate the shebang, execute permission, Bash installation, and line endings.
- renice access error: Confirm process ownership and use elevated privileges only when appropriate. Raising priority may be restricted.
- ifconfig not found: Use
ip addr. Install the legacy net-tools package only when compatibility requires it. - Unexpected hostname address: Inspect
/etc/hosts, resolver configuration, and DNS independently. - High swap use and slow performance: Check RAM and swap with
free -handswapon --show, identify memory-heavy processes, and evaluate workload or capacity changes.
For another attempt, return to the Linux Quiz and improve the topics represented by any missed answers.