Posts

Showing posts with the label XK0-005

SELinux Modes Explained: setenforce, getenforce and Troubleshooting

SELinux is mandatory access control for Linux. Standard Linux permissions are discretionary — the owner of a file decides who may read it. SELinux adds a policy layer that the owner cannot override, enforced by the kernel against every process. The practical consequence, and the reason it appears on the exam, is that a process can be denied access to a file its Unix permissions clearly allow. The three modes Mode Behaviour Enforcing Policy is applied; violations are blocked and logged Permissive Policy is not applied; violations are logged only Disabled SELinux is off; nothing is enforced or logged Permissive is the diagnostic mode. It lets you confirm whether SELinux is the cause of a problem without leaving the system unprotected, and it records every denial that would have occurred — so you can fix all of them at once rather than one reboot at a time. Checking and changing the mode getenforce prints the current mode. sestatus gives fuller detail, including the mode from...

YUM and DNF Explained: RPM Package Management for Linux+

YUM and its successor DNF are the package managers for Red Hat-based distributions — RHEL, CentOS, Rocky, AlmaLinux and Fedora. They sit above RPM, which handles individual packages, and add repositories and automatic dependency resolution. RPM, YUM and DNF Get the layering straight, because the exam tests it. RPM is the low-level tool and the package format. rpm -i package.rpm installs a single file. It will refuse to install if dependencies are missing, and it will not go and fetch them — it tells you what is absent and stops. YUM sits above RPM, knows about configured repositories, and resolves dependencies automatically. yum install httpd finds the package, works out what else it needs, and installs the lot. DNF is the rewritten replacement for YUM, default since RHEL 8 and Fedora 22. It uses a better dependency solver, is faster and uses less memory. On modern systems yum is a symbolic link to dnf , so the old commands still work — which is why both names appear in exam...

ext3 vs ext4 Explained: Linux File Systems for Linux+ and A+

ext4 is the default file system on most Linux distributions, and ext3 is its predecessor. The exams test what journaling gives you, what ext4 added, and how these compare with the other file systems you will meet. Journaling The feature that defines both, and the reason ext2 is obsolete. A journaling file system records its intended changes in a journal before making them. After a crash the system replays or discards the journal rather than scanning the entire file system for inconsistencies. On ext2, an unclean shutdown meant an fsck that could take hours on a large volume. On ext3 and ext4 it takes seconds. ext3 offers three journaling modes, and they come up as a comparison. Mode What is journaled Trade-off journal Metadata and data Safest, slowest ordered (default) Metadata, with data written first Good balance writeback Metadata only Fastest, may expose stale data after a crash Ordered is the default because it prevents the worst outcome — metadata saying a file is writ...

Linux Commands to Know for the CompTIA A+ and Linux+ Exams

Both A+ and Linux+ test command-line knowledge, at very different depths. A+ expects recognition of common commands and what they do; Linux+ expects you to use them with options and combine them. Grouping by task makes them easier to hold than an alphabetical list. Navigation and inspection pwd prints the working directory. cd changes it — cd ~ for home, cd - for the previous directory. ls lists; ls -l gives the long format with permissions and ownership, ls -a includes hidden files beginning with a dot, and ls -lh gives human-readable sizes. find searches the filesystem by name, size, age or type. locate is faster because it queries a pre-built database, at the cost of being only as current as the last database update. which shows the path of an executable. Files and directories cp copies, with -r for directories. mv moves and also renames. rm removes, rm -r recursively — and rm -rf deletes without prompting and without mercy, which is worth respecting. mkdir -p...