1/20
Looks like no tags are added yet.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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).
[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.
[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.
[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.
[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.
[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.