1/127
Looks like no tags are added yet.
In what year was UNIX created, at what lab, and by whom?
1969; AT&T Bell Labs; Ken Thompson and Dennis Ritchie.
Is the term UNIX trademarked, and who certifies compliance?
Yes, UNIX is a trademarked specification certified by The Open Group consortium.
What are the two major historical branches of UNIX?
System V (SysV) and BSD (Berkeley Software Distribution).
In what year was MINIX created, by whom, and what was its original design purpose?
1987; Andrew Tanenbaum; created for educational operating systems instruction (16-bit microkernel architecture).
In what year was Linux created, by whom, and what architecture did it originally target?
1991; Linus Torvalds; 32-bit architecture targeting the Intel 80386 processor.
What organization did Richard Stallman found, and what project provided the userland tools for Linux?
Free Software Foundation (FSF); the GNU Project (GNU's Not Unix).
What package management format and frontend tools are used by Red Hat/CentOS/Rocky/Fedora?
RPM package format; frontend tools are dnf and yum.
What package management format and frontend tools are used by Debian/Ubuntu?
.deb package format; frontend tools are apt and dpkg.
What package management format and tool is used by openSUSE?
RPM package format; frontend tool is zypper.
What are the three components of standard Linux command line grammar?
command [options/switches] [arguments]
How do short options differ from long options in syntax?
Short options begin with a single hyphen (-) and are single letters; long options begin with double hyphens (--) and use full words.
Can multiple short options without arguments be combined under a single hyphen?
Yes (e.g., ls -l -a can be written as ls -la or ls -al).
In command line grammar, what part of speech is a command analogous to?
A verb (an action).
In command line grammar, what part of speech is an option/switch analogous to?
An adverb or adjective (modifies how the action is performed).
In command line grammar, what part of speech is an argument analogous to?
A noun or direct object (the target acted upon, such as a file or directory).
If a short option takes an argument (such as -w 40), is a space required between the option and its argument?
No, a space is optional; both -w 40 and -w40 are valid.
How do you pass arguments to long options?
Using an equals sign or a space (e.g., --width=40 or --width 40).
What does the Bash command 'history 5' display?
Displays the last 5 commands executed from the history buffer.
What does the Bash shortcut '!!' do?
Re-executes the immediately preceding command line.
What does the Bash shortcut '!n' do (where n is a number)?
Re-executes command line number n from the history list.
What does the Bash shortcut '!-n' do (where n is a number)?
Re-executes the command n lines back from the bottom of history.
What does the Bash shortcut '!cat' do?
Re-executes the most recent command starting with the string 'cat'.
What Bash editing shortcut jumps the cursor directly to the beginning of the line?
Ctrl + A
What Bash editing shortcut jumps the cursor directly to the end of the line?
Ctrl + E
What Bash editing shortcut deletes/cuts text from the cursor position to the start of the line?
Ctrl + U
What Bash editing shortcut deletes/cuts text from the cursor position to the end of the line?
Ctrl + K
What Bash keyboard shortcut aborts, cancels, or sends SIGINT to the current foreground process?
Ctrl + C
What Bash keyboard shortcut clears the terminal screen buffer?
Ctrl + L (equivalent to typing 'clear').
What Bash editing shortcut moves forward one character?
Ctrl + F (or Right Arrow).
What Bash editing shortcut moves backward one character?
Ctrl + B (or Left Arrow).
In which directory hierarchy are system manual pages stored?
/usr/share/man
What category of documentation is contained in Section 1 of the man pages?
User shell commands and executable programs (e.g., ls, pwd, cat, date).
What category of documentation is contained in Section 5 of the man pages?
File formats and configuration file specifications (e.g., /etc/passwd, /etc/shadow).
What category of documentation is contained in Section 8 of the man pages?
System administration and root-only maintenance commands (e.g., useradd, fdisk).
What is the difference between running 'man passwd' and 'man 5 passwd'?
'man passwd' defaults to Section 1 (the user command to change passwords); 'man 5 passwd' opens Section 5 (the syntax of the /etc/passwd config file).
How do you initiate a forward text search inside a man page?
Type / followed by the search pattern, then press Enter.
How do you initiate a backward text search inside a man page?
Type ? followed by the search pattern, then press Enter.
While searching in a man page, what keystroke moves to the next occurrence in the same direction?
n (lowercase n).
While searching in a man page, what keystroke moves to the previous occurrence (opposite direction)?
N (uppercase N).
What keystrokes jump directly to the top and bottom of a man page?
1G (or g) jumps to the top; G jumps to the bottom.
What keystroke exits a man page viewer and returns to the shell?
q
What command searches the short descriptions inside man pages for a keyword (equivalent to 'man -k')?
apropos
What command displays a one-line summary from man page header descriptions (equivalent to 'man -f')?
whatis
What command provides built-in documentation for Bash internal commands (like cd, history, pwd)?
help (e.g., help cd)
What is the top-level parent directory of the entire Linux filesystem tree?
/ (the root directory).
What is stored inside the /boot directory?
Linux kernel images (vmlinuz), initial RAM disk (initramfs), and GRUB bootloader configuration files.
What is stored inside the /dev directory?
Device nodes/special files used by the OS to communicate with physical/virtual hardware (e.g., /dev/sda, /dev/null, /dev/zero).
What is stored inside the /etc directory?
Host-specific, static, system-wide text configuration files that persist across system reboots.
What type of data is stored in /var?
Variable data dynamically written during operations (logs in /var/log, spool files, databases, mail).
What is stored inside the /run directory, and what happens to it on reboot?
Volatile runtime process state data (PID files, sockets); stored in RAM (tmpfs) and completely wiped upon reboot.
What is stored inside the /usr directory?
Installed user-space programs, libraries, shared data, and system documentation (/usr/share).
Where are /bin and /sbin located on modern RHEL/CentOS systems?
They are symbolic links pointing to /usr/bin and /usr/sbin.
What distinguishes commands in /sbin from those in /bin?
/bin contains general user commands; /sbin contains system administration commands intended for the superuser (root).
What are the defining characteristics of an absolute pathname?
It begins with / (root) or ~ (tilde); it resolves unambiguously from anywhere in the filesystem.
What are the defining characteristics of a relative pathname?
It never begins with / or ~; its resolution depends entirely on the current working directory (pwd).
What does a single dot (.) represent in Linux path syntax?
The current working directory (pwd).
What does double dots (..) represent in Linux path syntax?
The immediate parent directory of the current directory.
What does 'cd -' do in Bash?
Changes the working directory to the previous working directory ($OLDPWD).
What does 'cd' or 'cd ~' without arguments do in Bash?
Changes the working directory to the current user's home directory ($HOME).
If 'cp' is given 3 or more arguments (e.g., cp file1 file2 /target/), what must the final argument be?
An existing directory.
What switch must be passed to 'cp' to copy an entire directory tree recursively?
-r or -R (recursive).
What does the 'cp -p' switch do?
Preserves file attributes (timestamps, ownership, and permission mode bits).
What happens if you run 'mv file1 file2' when file2 does not exist?
It renames file1 to file2.
What happens if you run 'mv file1 file2' when file2 is an existing directory?
It moves file1 into the directory file2/ without renaming it.
Does the 'mv' command require a recursive switch (-r) to move a directory?
No, mv moves or renames directories without any special switches.
What does 'mkdir -p /a/b/c' do?
Creates the leaf directory /c along with any missing parent directories (/a, /b) without returning an error.
Under what condition will the 'rmdir' command fail?
When the specified directory contains any files or subdirectories (it is not empty).
What command deletes a non-empty directory and all nested contents without any interactive prompting?
rm -rf
What does the wildcard asterisk (*) match in Bash file globbing?
Zero or more characters (any characters except a leading dot for hidden files).
What does the wildcard question mark (?) match in Bash file globbing?
Exactly one single character.
Does 'ls *' display hidden files? Why or why not?
No; in Linux hidden files begin with a dot (.), and wildcards do not match a leading dot unless explicitly specified (e.g., .*).
What does the file globbing pattern 'ls [abc]*' match?
Any visible file whose filename begins with lowercase a, b, or c.
What does the file globbing pattern 'ls [!abc]' or 'ls [^abc]' match?
Any visible file whose filename does NOT begin with a, b, or c.
What does the file globbing pattern 'ls [a-z]*' match?
Any visible file whose name begins with any lowercase letter from a through z.
What does the file globbing pattern '???' match?
Any visible filename that consists of exactly three characters.
What globbing pattern matches files with exactly 7 characters where the middle character is a lowercase vowel?
???[aeiou]???
What globbing pattern matches visible filenames that contain the character 'p' anywhere in the name?
p
What globbing pattern matches visible filenames that end with the letter 'z'?
*z
How do you match hidden files ending with the letter 'p'?
.*p
What are the two syntaxes for command substitution in Bash?
Modern syntax: $(command) | Legacy syntax: command (backticks).
What does Tilde Expansion '~' evaluate to?
The absolute path of the current user's home directory ($HOME).
What does '~username' evaluate to in Bash?
The absolute path of the specified user's home directory (e.g., /home/username).
What files are generated by running 'touch file{1..4}'?
file1, file2, file3, file4 (via Brace Expansion).
What files are generated by running 'touch file{a,b}{1,2}.txt'?
filea1.txt, filea2.txt, fileb1.txt, fileb2.txt.
How do hard links and symbolic (soft) links compare regarding inode allocation?
A hard link shares the exact same inode number as the target; a symbolic link receives its own unique inode containing the target's path string.
Can hard links span across different physical partitions or filesystems?
No; hard links are restricted to a single filesystem because inode tables are per-filesystem.
Can symbolic (soft) links point across different physical partitions or filesystems?
Yes, symbolic links store a path string and can freely span filesystems.
Can a regular user create a hard link pointing to a directory?
No; hard links to directories are disallowed to prevent circular directory loops.
Can a symbolic link point to a directory?
Yes (e.g., ln -s /tmp /home/user/mytemp).
What is a 'dangling link' in Linux?
A symbolic link whose target file or directory has been deleted or moved.
What happens to data on disk when the original name of a hard-linked file is removed with 'rm'?
The data remains fully accessible via the remaining hard link as long as the inode link count is 1 or higher.
What command is used to remove a symbolic link?
rm
What command creates a symbolic link named 'myconfig' pointing to '/etc/hosts'?
ln -s /etc/hosts myconfig.
What are the three standard POSIX I/O streams and their integer file descriptors?
0: stdin (Standard Input); 1: stdout (Standard Output); 2: stderr (Standard Error).
What is the default device source for stdin, and default destination for stdout and stderr?
stdin defaults to the keyboard; stdout and stderr default to the terminal screen.
What is the difference between '>' and '>>' redirection operators?
'>' redirects stdout and overwrites the destination file; '>>' redirects stdout and appends to the end of the file.
What command line syntax redirects only Standard Error (stderr) to a file named 'errors.log'?
command 2> errors.log.
What is '/dev/null' and why is it used in redirection?
The null device / bit bucket; any data redirected into it (e.g., 2> /dev/null) is discarded permanently.
What are the two valid syntaxes to redirect both stdout and stderr into the same file?
command &> file OR command > file 2>&1.
What syntax redirects stdout to 'out.txt' and stderr to 'err.txt' simultaneously?
command > out.txt 2> err.txt.