Notes
Notes
It is part of
nftables
The nft command allows administrators to define, inspect, and modify firewall rules
that control network traffic.
Bootloader: The bootloader (GRUB) is responsible for loading the kernel and
initramfs into memory during the boot process.
initramfs: A temporary filesystem used by the kernel before the root filesystem
is mounted. It contains necessary modules and scripts for hardware initialization
and setting up the system.
Kernel (vmlinuz): The kernel is responsible for managing the system's hardware
and software. It contains the core functionality of the operating system.
The logrotate utility is used to manage and rotate log files in Linux systems. It
helps in automating the process of managing large log files by rotating,
compressing, and deleting old logs according to specified rules.
Security: Podman can be run in a rootless mode, reducing the attack surface for
potential exploits.
No Daemon: Podman does not require a running daemon, meaning there's no single
point of failure.
Kubernetes Compatibility: Podman can generate Kubernetes-compatible configuration
files.
User-Friendly: For users already familiar with Docker, Podman is very similar,
making it easy to transition without needing to learn new commands.
ausearch is a command-line utility used to search through the audit logs on Linux
systems, specifically those managed by the Linux Auditing System. These logs
typically contain information about various system activities like USER LOGINS,
FILE ACCESSES, SYSTEM CALLS, AND OTHER SECURITY-RELEVANT EVENTS.
The ausearch tool allows administrators to filter and view audit log records based
on various criteria, such as:
Event type
Key (used for associating logs with specific events)
Syscall numbers
User, group, or process ID
Date and time
And more...
This tool is particularly useful for security auditing and forensics, as it helps
administrators to find and analyze logs related to specific activities or events.
Additional Useful Flags:
The /proc file system contains virtual files that provide information about
system processes, memory, CPU, and other kernel and system statistics. For example,
files like /proc/meminfo contain information about memory usage, and /proc/cpuinfo
contains details about the system's CPUs.
The /sys file system is used to interact with the kernel and provides
information about the system's hardware, including memory, CPU, devices, and more.
It provides a way for user-space processes to interact with kernel parameters and
devices. For example, /sys/devices/system/cpu/ contains information about the CPUs
on the system.
Ksplice is a tool developed by Oracle that allows for applying kernel patches and
updates without needing to reboot the system. It enables zero-downtime kernel
updates, meaning security patches and bug fixes can be applied to a running kernel
without disrupting system availability. This is particularly useful in production
environments where minimizing downtime is critical.
uptrack-upgrade:
UPTRACK-REMOVE:
Removes applied Ksplice updates, which effectively reverts the system to the
state it was in before updates were applied.
Configuration Files:
Apply Updates Without Reboot: If there’s a security update for the kernel,
Ksplice can apply it while the system is still running:
uptrack-upgrade
Remove Applied Patches: If you need to revert a kernel update or remove all applied
patches, you can do so with:
Check Current Status: To see the current state of Ksplice updates on the system:
uptrack-status
By using Ksplice, Oracle Linux administrators can ensure that critical kernel
updates are applied swiftly without causing any downtime, which is crucial for
high-availability systems.
QN: 29 - B, F,G
When you switch an enabled module stream in Oracle Linux (or any system using DNF
modules), it will impact the installed package by updating it to match the selected
stream's version and configuration.
QN:30 - C, E
AutoFS is a service that automatically mounts and unmounts file systems based on
demand. It is commonly used to manage network file systems like NFS or automating
the mounting of shared directories. AutoFS dynamically mounts file systems when
they are accessed and unmounts them after a specified period of inactivity. This
makes it a highly efficient way to handle remote file systems without needing to
manually mount or unmount them.
/etc/auto.master: The primary configuration file that defines where AutoFS will
look for mount points.
/etc/auto. files*: These files (e.g., /etc/auto.nfs, /etc/auto.smb) specify
specific details on how to mount different file systems or services.
ldd $(which bash): Lists the libraries required by the bash shell.
QN:33 - B
udev, the device manager for Linux, generates network device names according to a
set of rules and naming schemes. These schemes include the MAC address, PCI slot,
and interface location, ensuring consistent naming across reboots.
Filter: A filter defines the conditions that log messages must meet to be
processed by a specific rule. It can filter log messages based on things like
severity, facility, or specific content in the message.
Action: An action is the operation that is applied to the log messages that
match the filter. Actions define where the log messages are sent (e.g., to a file,
a remote server, or another output).
QN: 42 - B,C
Containers package not only the application but also the required runtime
environment (dependencies, libraries, and configurations) to run the application.
This ensures that the application can run consistently across different
environments without issues related to differences in the underlying operating
system.
QN:51 - B,C
QN:52 - A,B
QN:53 - C
A cgroup is a kernel feature used to group processes together for the purpose of
limiting, prioritizing, and monitoring their resource usage. These resources can
include CPU, memory, I/O bandwidth, and more. The configuration and limits are
defined in the cgroup filesystem.
QN:60 - B,D
ksplice show
Patch installed: This shows the patches that have been applied to your system
kernel.
Kernel version: The version of the kernel for which the patch was applied.
Patch details: Brief details about the patch, such as whether it's a security
patch, bug fix, or other update.
Patch application date: The date when the patch was applied.
/etc/NetworkManager/NetworkManager.conf
/etc/NetworkManager/system-connections/
DNF reinstall
Reinstalling a package will remove the current installation of the package and
reinstall it, restoring its default configuration files and binaries.
If the package was previously installed, it will be replaced with the version
available in the repositories, whether the same version or a newer one.
Fixing broken or corrupted packages.
Restoring a package to its original state when you suspect it has been
misconfigured or corrupted.
Reinstalling a package will not remove any user-modified configuration files that
are part of the package unless you specifically remove the configuration files
beforehand.
Temporarily changes a parameter’s value for the current session. This change
will not persist after a reboot.
Displays Installed Kernel Updates: uptrack-show shows the list of patches that have
been applied to the running kernel using Ksplice.
Lists Available Updates: If there are updates available but not yet applied, it
lists those as well, allowing you to see what patches are pending.
Shows Patch Status: The output provides details on whether each patch has been
successfully applied, is pending, or has encountered issues.
When you run sudo sysctl --system to apply settings, the system reads and applies
settings from various files in a specific order:
A chroot jail (or chroot environment) is a mechanism that isolates a process or set
of processes in a restricted directory (the "jail"), making it appear as if it has
its own root directory. This is useful for running certain applications in a
contained environment, improving security by limiting what the processes can access
outside of the jail.
Maintaining a chroot jail requires ensuring that the correct binaries, libraries,
and configuration files are kept up to date, especially if you’re running software
that needs updates or security patches.
Update the Jail: If you install new software on the host system, you may need
to copy the new binaries and libraries into the chroot jail.
Add Additional Users: If you need to allow other users into the jail, add them
to the /etc/passwd and /etc/group inside the chroot environment.
Logs: You can configure logging for activities inside the chroot jail,
depending on the services running there.
Inside the chroot jail, the libraries and binaries from the host system are not
accessible unless explicitly copied or linked inside the chroot.
To copy the ACL from one file to another, you can use the getfacl command to
retrieve the existing ACL and then use setfacl to apply it to the new file.
Steps:
Explanation:
ACL - User- and group-specific permissions: You can specify permissions for users
or groups that do not own the file.
Benefits of ACLs:
Granular Permissions: ACLs provide much more flexibility than the traditional
user/group/other model by allowing permissions to be assigned to multiple users or
groups on a single file or directory.
Inheritance: Default ACLs allow new files created within a directory to inherit
the same permissions, simplifying administration.
Compatibility: ACLs do not replace traditional file permissions but extend
them, making it easy to use both in tandem.
Considerations:
Performance: While ACLs provide more flexibility, they might introduce slight
overhead when managing large numbers of files.
Compatibility: ACLs are not supported on all file systems. You need to ensure
that the file system in use supports ACLs (e.g., ext3, ext4, xfs).
Complexity: For simpler environments, the traditional file permissions model
(owner, group, others) may suffice. ACLs are beneficial in more complex setups
requiring fine-grained control.
The configuration file for journalctl is part of the systemd journal, and its
settings are managed through the journald configuration file, located at:
/etc/systemd/journald.conf
swapon --show and cat /proc/swaps give the most direct information on active swap
devices
sudo nmcli connection add type ethernet ifname eth1 con-name eth1 ipv4.addresses
<IP>/<Subnet Mask> ipv4.gateway <Gateway IP> ipv4.dns <DNS Server IP> ipv4.method
manual