🐧 Linux Engineering — Week 01

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/20

encourage image

There are no tags or description

Looks like no tags are added yet.

21 Terms

1
New cards

[Linux] When a program requests memory or reads a disk file, which core operating-system component manages access to these resources?

The Linux kernel. It manages memory, processes, hardware and core system operations.

2
New cards

[Linux] What is the difference between the paths / and /root?

/ is the root of the filesystem tree. /root is the root user's home directory.

3
New cards

[Linux] You need to inspect system-wide configuration, such as /etc/ssh/sshd_config. Which top-level directory conventionally stores it?

/etc. It contains system-wide configuration files.

4
New cards

[Linux] You read /proc/uptime. Is this an ordinary persistent disk file, or is its information provided by the kernel?

It is a virtual file provided through procfs. Its contents expose kernel information rather than ordinary persistent file data.

5
New cards

[Linux] Where are system logs conventionally stored: /etc, /var/log or /proc?

/var/log, under /var, the hierarchy for variable data such as logs, caches and application state.

6
New cards

[Linux] You save important notes in /tmp and reboot. Can you rely on the notes still being there?

No. Temporary files can be removed at reboot or by cleanup policies. Use a persistent location for important files.

7
New cards

[Linux] A USB filesystem is mounted at /mnt/usb. What is /mnt/usb called in this arrangement?

A mount point. It is the path through which the mounted filesystem is accessed.

8
New cards

[Linux] /home and /var are on the same filesystem with 10 GiB available. Are they each guaranteed a separate 10 GiB allocation?

No. They share the filesystem's free space unless separate quotas or other limits apply.

9
New cards

[Linux] A USB filesystem is mounted at /mnt/usb. With no nested mounts or symlinks, where does a new file /mnt/usb/notes.txt reside?

On the mounted USB filesystem, not the filesystem that contains the underlying mount-point directory.

10
New cards

[Linux] One SSD contains two partitions. Can one be formatted as XFS and the other as FAT32?

Yes. Each partition can be formatted independently with a supported filesystem.

11
New cards

[Linux] You want a filesystem to mount at a specified directory automatically during normal boot. Which configuration file commonly describes that mount?

/etc/fstab. It records filesystem identifiers, mount points, filesystem types and mount options.

12
New cards

[Linux] free -h reports swap, and swapon --show lists /dev/zram0. Is that swap stored primarily on an SSD or in RAM?

In RAM as compressed data. Zram provides a compressed block device that can be used as swap.

13
New cards

[Linux] A service only needs to read one configuration file. Why avoid granting it root privileges?

The principle of least privilege: grant only the access needed for the task, reducing potential damage or misuse.

14
New cards

[Linux] A file has the wrong owner and wrong permission bits. Which commands change ownership and permissions respectively?

chown changes ownership; chmod changes permission bits.

15
New cards

[Linux] What permissions does chmod 640 notes.txt give to the owner, group and others?

Owner: read/write (6). Group: read (4). Others: none (0).

16
New cards

[Linux] What does execute (x) permission on a directory allow, unlike execute permission on a regular file?

It permits directory traversal and access to known entry names, subject to permissions on the rest of the path and the entry itself.

17
New cards

[Linux] An ordinary user can read notes.txt but lacks execute permission on its parent directory. Can they open it by pathname? Assume no special privileges or ACLs.

No. They need directory traversal permission in addition to the file's read permission.

18
New cards

[Linux] The nginx executable exists on disk but nginx is not running. Is the executable itself a process?

No. A program contains instructions; a process is an executing instance with its own runtime state.

19
New cards

[Linux] You launch the same Java program twice as two independent JVM processes. Do the two processes have the same PID?

No. Simultaneously running processes in the same PID namespace have distinct process IDs.

20
New cards

[Linux] Nginx fails to start on a systemd server. Which command shows its service state and recent journal messages?

systemctl status nginx. It shows the unit state, relevant process information and recent log entries.

21
New cards