LIOS Logs
RAID combines disks for redundancy and/or speed: 0 = stripe (fast, no safety), 1 = mirror (full copy), 5/6 = stripe + parity (survive 1 or 2 failures), 10 = mirror + stripe (both).
* RAID 5 — striping with parity distributed across all disks, so any one disk can fail and be rebu...
Q What are the three standard file descriptors in Linux and what are their numbers?
stdin = 0, stdout = 1, stderr = 2 — the three numbered streams every process gets for free.
* Every process starts with three wired-up descriptors: 0 (stdin), 1 (stdout), 2 (stderr). — Danielpr85, Public domain, via Wikimedia Commons. *
A file descriptor (FD) is just a small int...
Q What are practical examples of using pipes in Linux?
Chain small tools with | so each does one job — list-then-sort, read-then-filter, search-then-page.
The Unix philosophy is "small programs that do one thing well, connected by pipes." A few staples:
# Show last 2 lines of passwd file:
cat /etc/passwd | tail -n 2
labstudent:x:1004...
Q What are the different ways to enter Insert mode in VIM?
i/a insert before/after the cursor, I/A jump to line start/end, o/O open a new line below/above — all then start typing.
The point is that you pick the entry key that already puts the cursor where you want to type, saving a navigation step. Lowercase acts at the cursor, uppercase...
Q How do you enable spell checking in VIM?
Turn it on with :set spell spelllang=en; then ]s/[s jump between misspellings and z= suggests fixes.
Once spell-checking is on, vim underlines/highlights unrecognized words. You don't hunt for them by eye — ]s jumps to the next flagged word, z= lists corrections to pick from, and...
Q What is the Linux filesystem hierarchy and what is the root directory?
Linux arranges everything as one upside-down tree whose single root is /; every file and directory hangs somewhere beneath it.
* The Linux filesystem as one inverted tree rooted at /, branching into /bin, /etc, /usr, /var, /home and the rest. — Ppgardne, CC BY-SA 4.0, via Wikime...
Q What is stored in the /root directory?
/root is the home directory of the root (superuser) account — root's equivalent of a user's /home/name folder.
It holds exactly what any home directory holds, but for the administrator: root's dotfiles, command history, and admin scripts. Only root can read or write it.
The inter...
Q What commands are used for navigating the filesystem?
Three commands cover navigation: pwd ("where am I?"), ls ("what's here?"), and cd ("take me there"). They map onto the three questions you ask constantly at the command line.
Because the shell has no visible "you are here" map, these are how you stay oriented. pwd prints your cur...
Q How do you chain commands in bash using ;, &&, and ||?
; runs commands one after another no matter what; && runs the next one only if the previous succeeded; || runs the next one only if the previous failed.
* The three chaining operators read command A's exit code: ; ignores it, && needs success, || needs failure. *
The two conditi...
Q What does the history command do and how do you rerun previous commands?
history prints a numbered list of the commands you've run; you re-run them with !-expansions like !! (last command) or !503 (command number 503).
Each line in history has a number, and the ! prefix is how you point back at one. The shell expands the reference before running, so !...