LFCA study materials
LFCA study resources

LFCA: Linux Fundamentals

LFCA · Work through your exam, one topic at a time.

All guide sections

Linux Fundamentals

Linux Fundamentals tests command-line fluency: navigating the filesystem, interpreting permissions, managing processes, and using package tools. Questions often present a symptom and ask which command or permission change resolves it.

Filesystem and paths

The Filesystem Hierarchy Standard puts configuration in /etc, variable data in /var, user homes in /home, temporary files in /tmp, and installed software in /usr. /proc and /sys are virtual views of kernel state. Use pwd, cd, ls -l, and absolute paths when a script may run from another directory.

Permissions, ownership, and processes

ls -l shows type and rwx triples for user, group, other. Octal 644 means owner read/write, group and other read. On a directory, x permits traversal and w permits creating or removing entries; read alone only lists names. chown changes owner/group, chmod changes mode, and umask sets default permissions. Use ps, top, and kill to inspect and signal processes; send TERM before KILL.

Worked example

An app runs as www-data and must write uploads in /srv/app/uploads, currently root:root 755. Making it 777 works but grants every user write access. Better: create group appwrite, add www-data, run chgrp appwrite /srv/app/uploads, then chmod 2775 /srv/app/uploads. The setgid bit makes new files inherit the group; owner/group get write, others read/execute.

Traps

Do not use chmod 777 as a default fix. Remember that deleting a file depends on write permission on its directory, not the file. A relative path can break under cron or systemd. kill -9 prevents cleanup.