<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on Alperen Doc</title><link>https://blog.ulutasalperen.com/docs/linux/</link><description>Recent content in Linux on Alperen Doc</description><generator>Hugo</generator><language>en</language><atom:link href="https://blog.ulutasalperen.com/docs/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>linux-user-management</title><link>https://blog.ulutasalperen.com/docs/linux/linux-user-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/linux-user-management/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Regular user creation, system user creation, sudo privileges, verification, and usage scenarios.&lt;/p&gt;&#10;&lt;h1 id="part-1-debian-based-systems"&gt;Part 1: Debian-Based Systems&lt;a class="anchor" href="#part-1-debian-based-systems"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt; Debian, Ubuntu&lt;/p&gt;&#10;&lt;h2 id="1-install-sudo"&gt;1. Install sudo&lt;a class="anchor" href="#1-install-sudo"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Run as root:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt update&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt install sudo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="2-create-a-regular-user"&gt;2. Create a Regular User&lt;a class="anchor" href="#2-create-a-regular-user"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Create a user interactively:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;adduser &amp;lt;USERNAME&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Alternatively, use &lt;code&gt;useradd&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;useradd -m -s /bin/bash &amp;lt;USERNAME&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;passwd &amp;lt;USERNAME&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;-m&lt;/code&gt;: Creates the user&amp;rsquo;s home directory.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;-s /bin/bash&lt;/code&gt;: Sets Bash as the default shell.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;passwd&lt;/code&gt;: Sets or changes the user&amp;rsquo;s password.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="3-grant-sudo-privileges"&gt;3. Grant Sudo Privileges&lt;a class="anchor" href="#3-grant-sudo-privileges"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Add the user to the &lt;code&gt;sudo&lt;/code&gt; group:&lt;/p&gt;</description></item><item><title>group-management</title><link>https://blog.ulutasalperen.com/docs/linux/group-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/group-management/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Primary and supplementary groups, group creation and deletion, membership management, /etc/group and /etc/gshadow, group modification, and verification.&lt;/p&gt;&#10;&lt;h1 id="part-1-debian-based-systems"&gt;Part 1: Debian-Based Systems&lt;a class="anchor" href="#part-1-debian-based-systems"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt; Debian, Ubuntu&lt;/p&gt;&#10;&lt;h2 id="1-create-a-group"&gt;1. Create a Group&lt;a class="anchor" href="#1-create-a-group"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Run as root:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;addgroup &amp;lt;GROUP_NAME&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The GID is allocated automatically from the regular GID range.&lt;/p&gt;&#10;&lt;h2 id="2-create-a-system-group"&gt;2. Create a System Group&lt;a class="anchor" href="#2-create-a-system-group"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Create a system group for a service or application:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;addgroup --system &amp;lt;GROUP_NAME&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;--system&lt;/code&gt;: Allocates the GID from the system GID range instead of the regular range.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="3-add-a-user-to-a-group"&gt;3. Add a User to a Group&lt;a class="anchor" href="#3-add-a-user-to-a-group"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Add the user to the group as a supplementary group:&lt;/p&gt;</description></item><item><title>file-permissions</title><link>https://blog.ulutasalperen.com/docs/linux/file-permissions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/file-permissions/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Distro-independent; applies to ext4, XFS, and other standard Linux filesystems&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; ls -l output, ugo and rwx, chmod notation, ownership with chown and chgrp, umask, SUID, SGID, sticky bit, ACLs, and verification.&lt;/p&gt;&#10;&lt;h1 id="main-flow"&gt;Main Flow&lt;a class="anchor" href="#main-flow"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;h2 id="1-read-the-permission-string"&gt;1. Read the Permission String&lt;a class="anchor" href="#1-read-the-permission-string"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;List the file details:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ls -l &amp;lt;FILE&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-rwxr-xr-- 1 alice devops 2048 Mar 5 10:00 report.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Break down the output:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;-rwxr-xr--&lt;/code&gt;: Permission string.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;1&lt;/code&gt;: Hard link count.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;alice&lt;/code&gt;: Owner (user).&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;devops&lt;/code&gt;: Owning group.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;2048&lt;/code&gt;: Size in bytes.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;Mar 5 10:00&lt;/code&gt;: Last modification time.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;report.sh&lt;/code&gt;: File name.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Read the permission string as follows:&lt;/p&gt;</description></item><item><title>system-information</title><link>https://blog.ulutasalperen.com/docs/linux/system-information/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/system-information/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Distro-independent; applies to Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; os-release fields, scripting with os-release, uname, hostnamectl, release files, and verification.&lt;/p&gt;&#10;&lt;h2 id="1-identify-the-distribution-with-etcos-release"&gt;1. Identify the Distribution with /etc/os-release&lt;a class="anchor" href="#1-identify-the-distribution-with-etcos-release"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;/etc/os-release&lt;/code&gt; is the standard machine-readable identification file defined by the os-release specification. Shell scripts, provisioning tools, and package managers source it to detect the distribution. It is present on every current Debian-based and RHEL-based system.&lt;/p&gt;&#10;&lt;p&gt;Inspect the file:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /etc/os-release&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output on Ubuntu 24.04:&lt;/p&gt;</description></item><item><title>sudo</title><link>https://blog.ulutasalperen.com/docs/linux/sudo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/sudo/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; sudo basics, visudo, sudoers syntax, command tags, drop-in files, privilege inspection, logging, and common pitfalls.&lt;/p&gt;&#10;&lt;h1 id="part-1-debian-based-systems"&gt;Part 1: Debian-Based Systems&lt;a class="anchor" href="#part-1-debian-based-systems"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt; Debian, Ubuntu&lt;/p&gt;&#10;&lt;h2 id="1-install-sudo"&gt;1. Install sudo&lt;a class="anchor" href="#1-install-sudo"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Run as root:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt update&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt install sudo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="2-edit-the-sudoers-file-safely"&gt;2. Edit the Sudoers File Safely&lt;a class="anchor" href="#2-edit-the-sudoers-file-safely"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Edit the sudoers configuration only with &lt;code&gt;visudo&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;visudo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;visudo&lt;/code&gt; locks the file against concurrent edits, parses the result before saving, and refuses to write a broken configuration. A single syntax error in &lt;code&gt;/etc/sudoers&lt;/code&gt; can remove administrative access from every account.&lt;/p&gt;</description></item><item><title>ssh</title><link>https://blog.ulutasalperen.com/docs/linux/ssh/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/ssh/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; ed25519 key pairs, public key installation, authorized_keys permissions, sshd hardening, service validation and restart, and ssh-agent.&lt;/p&gt;&#10;&lt;h1 id="part-1-debian-based-systems"&gt;Part 1: Debian-Based Systems&lt;a class="anchor" href="#part-1-debian-based-systems"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt; Debian, Ubuntu&lt;/p&gt;&#10;&lt;h2 id="1-generate-an-ed25519-key-pair"&gt;1. Generate an ed25519 Key Pair&lt;a class="anchor" href="#1-generate-an-ed25519-key-pair"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Run on the client machine as the user who will log in:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ssh-keygen -t ed25519 -C &lt;span style="color:#e6db74"&gt;&amp;#34;&amp;lt;USERNAME&amp;gt;@&amp;lt;CLIENT_HOST&amp;gt;&amp;#34;&lt;/span&gt; -f ~/.ssh/id_ed25519&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;-t ed25519&lt;/code&gt;: Uses the Ed25519 algorithm. It is fast, small, and current.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;-C&lt;/code&gt;: Attaches a comment to the public key, typically the account and host.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;-f&lt;/code&gt;: Sets the output path for the private key.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Enter a passphrase when prompted. The private key is stored encrypted on disk.&lt;/p&gt;</description></item><item><title>systemd</title><link>https://blog.ulutasalperen.com/docs/linux/systemd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/systemd/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; systemctl basics, unit file anatomy, custom services, journald logging, and startup analysis.&lt;/p&gt;&#10;&lt;h2 id="1-check-service-status"&gt;1. Check Service Status&lt;a class="anchor" href="#1-check-service-status"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Inspect a unit:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl status &amp;lt;SERVICE_NAME&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;● &amp;lt;SERVICE_NAME&amp;gt;.service - Example application&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Loaded: loaded (/etc/systemd/system/&amp;lt;SERVICE_NAME&amp;gt;.service; enabled; preset: enabled)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Active: active (running) since Tue 2026-02-10 08:00:00 UTC; 5min ago&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Main PID: 1234 (myapp)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Tasks: 3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Memory: 24.0M&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Query individual states:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl is-active &amp;lt;SERVICE_NAME&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl is-enabled &amp;lt;SERVICE_NAME&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>process-management</title><link>https://blog.ulutasalperen.com/docs/linux/process-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/process-management/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Process listing, signals, priority, background jobs, zombie diagnosis, and the /proc filesystem.&lt;/p&gt;&#10;&lt;h2 id="1-list-running-processes"&gt;1. List Running Processes&lt;a class="anchor" href="#1-list-running-processes"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;List all processes of all users in BSD style:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ps aux&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Columns:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;USER&lt;/code&gt;: Owner of the process.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;PID&lt;/code&gt;: Process ID.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;%CPU&lt;/code&gt; and &lt;code&gt;%MEM&lt;/code&gt;: CPU and memory usage.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;VSZ&lt;/code&gt; and &lt;code&gt;RSS&lt;/code&gt;: Virtual and resident memory in kibibytes.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;TTY&lt;/code&gt;: Controlling terminal. &lt;code&gt;?&lt;/code&gt; means no terminal.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;STAT&lt;/code&gt;: Process state. &lt;code&gt;R&lt;/code&gt; running, &lt;code&gt;S&lt;/code&gt; sleeping, &lt;code&gt;Z&lt;/code&gt; zombie, &lt;code&gt;T&lt;/code&gt; stopped.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;START&lt;/code&gt;: Start time of the process.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;TIME&lt;/code&gt;: Accumulated CPU time.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;COMMAND&lt;/code&gt;: Executed command.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;List all processes in System V style:&lt;/p&gt;</description></item><item><title>process-internals</title><link>https://blog.ulutasalperen.com/docs/linux/process-internals/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/process-internals/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Distro-independent Linux internals: programs, processes, and namespaces&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Programs versus processes, fork and exec, process tree, /proc mapping, namespaces, and containers.&lt;/p&gt;&#10;&lt;h2 id="1-recognize-that-a-program-is-a-file"&gt;1. Recognize That a Program Is a File&lt;a class="anchor" href="#1-recognize-that-a-program-is-a-file"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A program is an ordinary file on disk: either a compiled binary in ELF format or a script interpreted through a shebang line. The execute permission turns a file into a runnable program.&lt;/p&gt;&#10;&lt;p&gt;Identify the type of a binary:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;file /usr/bin/ls&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output:&lt;/p&gt;</description></item><item><title>cron-timers</title><link>https://blog.ulutasalperen.com/docs/linux/cron-timers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/cron-timers/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Crontab syntax, system-wide cron files, cron access control, cron logging, and systemd timers.&lt;/p&gt;&#10;&lt;h1 id="part-1-debian-based-systems"&gt;Part 1: Debian-Based Systems&lt;a class="anchor" href="#part-1-debian-based-systems"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt; Debian, Ubuntu&lt;/p&gt;&#10;&lt;h2 id="1-install-cron"&gt;1. Install Cron&lt;a class="anchor" href="#1-install-cron"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Run as root:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt update&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt install cron&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl enable --now cron&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The service is named &lt;code&gt;cron&lt;/code&gt;. Verify:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl status cron&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="2-edit-the-user-crontab"&gt;2. Edit the User Crontab&lt;a class="anchor" href="#2-edit-the-user-crontab"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Open the crontab editor, list entries, or remove the crontab:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;crontab -e&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;crontab -l&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;crontab -r&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>networking-basics</title><link>https://blog.ulutasalperen.com/docs/linux/networking-basics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/networking-basics/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Interface inspection, links, routes, neighbors, sockets, hostname configuration, netplan, NetworkManager, and verification.&lt;/p&gt;&#10;&lt;h2 id="1-inspect-network-interfaces"&gt;1. Inspect Network Interfaces&lt;a class="anchor" href="#1-inspect-network-interfaces"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;List all interfaces and addresses:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip addr show&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use the compact view:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip -br addr&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lo UNKNOWN 127.0.0.1/8 ::1/128&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;eth0 UP 192.0.2.10/24 fe80::a00:27ff:fe1a:2b3c/64&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="2-inspect-and-change-the-link-state"&gt;2. Inspect and Change the Link State&lt;a class="anchor" href="#2-inspect-and-change-the-link-state"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Show link state and MAC addresses:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip link show&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Bring an interface up:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo ip link set &amp;lt;INTERFACE&amp;gt; up&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="3-inspect-routes"&gt;3. Inspect Routes&lt;a class="anchor" href="#3-inspect-routes"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Show the routing table:&lt;/p&gt;</description></item><item><title>dns</title><link>https://blog.ulutasalperen.com/docs/linux/dns/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/dns/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Resolution order, /etc/nsswitch.conf, /etc/hosts, /etc/resolv.conf, dig, nslookup, host, getent, systemd-resolved, NetworkManager DNS, caching, and search domains.&lt;/p&gt;&#10;&lt;h2 id="1-inspect-the-resolution-order"&gt;1. Inspect the Resolution Order&lt;a class="anchor" href="#1-inspect-the-resolution-order"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Inspect the Name Service Switch configuration:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /etc/nsswitch.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Locate the &lt;code&gt;hosts&lt;/code&gt; line:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;hosts: files dns&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;files&lt;/code&gt; resolves names through &lt;code&gt;/etc/hosts&lt;/code&gt;. &lt;code&gt;dns&lt;/code&gt; queries the nameservers in &lt;code&gt;/etc/resolv.conf&lt;/code&gt;. Sources are consulted from left to right.&lt;/p&gt;&#10;&lt;h2 id="2-add-local-host-mappings"&gt;2. Add Local Host Mappings&lt;a class="anchor" href="#2-add-local-host-mappings"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Edit the local hosts file:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo vim /etc/hosts&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Format:&lt;/p&gt;</description></item><item><title>firewall</title><link>https://blog.ulutasalperen.com/docs/linux/firewall/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/firewall/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Host firewalls, ufw, application profiles, firewalld, zones, rich rules, nftables, iptables, common ports, and safe rule management.&lt;/p&gt;&#10;&lt;p&gt;A host firewall filters incoming and outgoing traffic on a single system. It is the first control point for exposed services and should be configured before a service is started on a production interface. Debian-based systems commonly use ufw, RHEL-based systems use firewalld, and both build their rules on the nftables kernel framework.&lt;/p&gt;</description></item><item><title>network-troubleshooting</title><link>https://blog.ulutasalperen.com/docs/linux/network-troubleshooting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/network-troubleshooting/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Distro-independent network troubleshooting on Debian-based and RHEL-based systems&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Layered diagnosis, ip, ss, ping, traceroute, mtr, dig, curl, tcpdump, packet capture, and error interpretation.&lt;/p&gt;&#10;&lt;h2 id="1-work-through-the-layers"&gt;1. Work Through the Layers&lt;a class="anchor" href="#1-work-through-the-layers"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Diagnose in a fixed order: link, address, route, DNS, port, then application. Stop at the first failing layer and fix it before continuing. Skipping layers produces false conclusions and wasted time.&lt;/p&gt;&#10;&lt;h2 id="2-check-the-link-state"&gt;2. Check the Link State&lt;a class="anchor" href="#2-check-the-link-state"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Inspect the interface:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip link show &amp;lt;INTERFACE&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output fragment:&lt;/p&gt;</description></item><item><title>filesystem-hierarchy</title><link>https://blog.ulutasalperen.com/docs/linux/filesystem-hierarchy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/filesystem-hierarchy/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Standard Linux filesystem hierarchy on Debian-based and RHEL-based distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; FHS directory layout, /bin vs /sbin, virtual filesystems, mount points, safe cleanup, and reference tables.&lt;/p&gt;&#10;&lt;h2 id="1-understand-the-root-directory"&gt;1. Understand the Root Directory&lt;a class="anchor" href="#1-understand-the-root-directory"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The root directory &lt;code&gt;/&lt;/code&gt; is the single top of the filesystem tree. Every file and device on the system is reachable from it.&lt;/p&gt;&#10;&lt;p&gt;Inspect it:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ls /&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output (contents vary by installation):&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The layout follows the Filesystem Hierarchy Standard (FHS). Each directory holds a specific category of data: configuration in &lt;code&gt;/etc&lt;/code&gt;, variable data in &lt;code&gt;/var&lt;/code&gt;, user data in &lt;code&gt;/home&lt;/code&gt;, and virtual kernel interfaces in &lt;code&gt;/proc&lt;/code&gt;, &lt;code&gt;/sys&lt;/code&gt;, and &lt;code&gt;/dev&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>disk-management</title><link>https://blog.ulutasalperen.com/docs/linux/disk-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/disk-management/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Block devices, partitions, filesystems, mounts, fstab, and swap on Debian-based and RHEL-based distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; lsblk, blkid, parted, GPT, mkfs.ext4, mkfs.xfs, mount, fstab, swap.&lt;/p&gt;&#10;&lt;h2 id="1-inspect-block-devices"&gt;1. Inspect Block Devices&lt;a class="anchor" href="#1-inspect-block-devices"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Identify every block device before touching it:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lsblk&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lsblk -f&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output (example):&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;NAME FSTYPE LABEL UUID MOUNTPOINT&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sda&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├─sda1 ext4 1a2b3c4d-0000-0000-0000-000000000000 /&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;└─sda2 swap 5e6f7a8b-0000-0000-0000-000000000000 [SWAP]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sdb&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;└─sdb1 ext4 9c8d7e6f-0000-0000-0000-000000000000 /srv/data&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;lsblk&lt;/code&gt;: Lists devices, sizes, types, and mount points.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;-f&lt;/code&gt;: Adds filesystem type, label, and UUID.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="2-read-device-attributes-with-blkid"&gt;2. Read Device Attributes with blkid&lt;a class="anchor" href="#2-read-device-attributes-with-blkid"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Inspect the usage:&lt;/p&gt;</description></item><item><title>lvm</title><link>https://blog.ulutasalperen.com/docs/linux/lvm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/lvm/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Logical Volume Management on Debian-based and RHEL-based distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; PV, VG, LV, pvcreate, vgcreate, lvcreate, lvextend, resize2fs, xfs_growfs, cloud volume extension.&lt;/p&gt;&#10;&lt;h2 id="1-understand-the-lvm-model"&gt;1. Understand the LVM Model&lt;a class="anchor" href="#1-understand-the-lvm-model"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;LVM places an abstraction layer between physical disks and filesystems:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Physical Volume (PV): A disk or partition registered with LVM.&lt;/li&gt;&#10;&lt;li&gt;Volume Group (VG): A storage pool built from one or more PVs.&lt;/li&gt;&#10;&lt;li&gt;Logical Volume (LV): A flexible volume carved from a VG, formatted and mounted like a partition.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;An LV appears as &lt;code&gt;/dev/&amp;lt;VG_NAME&amp;gt;/&amp;lt;LV_NAME&amp;gt;&lt;/code&gt;. Unlike partitions, LVs can be extended while mounted.&lt;/p&gt;</description></item><item><title>disk-troubleshooting</title><link>https://blog.ulutasalperen.com/docs/linux/disk-troubleshooting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/disk-troubleshooting/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Diagnosing and resolving full-filesystem and inode exhaustion on Debian-based and RHEL-based distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; df, du, inodes, deleted-but-open files, lsof, log growth, package caches, containers.&lt;/p&gt;&#10;&lt;h2 id="1-check-space-usage-with-df"&gt;1. Check Space Usage with df&lt;a class="anchor" href="#1-check-space-usage-with-df"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Start with the filesystem that reports high usage:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;df -h&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;df -hT&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output (example):&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Filesystem Type Size Used Avail Use% Mounted on&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/dev/sda2 ext4 50G 48G 2.0G 96% /&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;-h&lt;/code&gt;: Human-readable sizes.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;-T&lt;/code&gt;: Adds the filesystem type.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;A full filesystem fails writes with &lt;code&gt;No space left on device&lt;/code&gt;. Note the mount point: a full &lt;code&gt;/var&lt;/code&gt; can stop services while &lt;code&gt;/&lt;/code&gt; still has free space.&lt;/p&gt;</description></item><item><title>log-management</title><link>https://blog.ulutasalperen.com/docs/linux/log-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/log-management/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Log sources, locations, querying, and rotation on Debian-based and RHEL-based distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; rsyslog, /var/log layout, journald, journalctl, logrotate.&lt;/p&gt;&#10;&lt;h2 id="1-understand-the-log-sources"&gt;1. Understand the Log Sources&lt;a class="anchor" href="#1-understand-the-log-sources"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Two logging systems handle messages on current distributions:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;systemd-journald: Collects messages from the kernel, services, and stdout/stderr of units. Stores them in the journal, which is volatile in &lt;code&gt;/run/log/journal&lt;/code&gt; unless persistent storage is configured.&lt;/li&gt;&#10;&lt;li&gt;rsyslog: Traditional syslog daemon. Reads &lt;code&gt;/etc/rsyslog.conf&lt;/code&gt; and &lt;code&gt;/etc/rsyslog.d/*.conf&lt;/code&gt; and writes text files under &lt;code&gt;/var/log&lt;/code&gt;. On RHEL-based systems it imports messages from the journal through the &lt;code&gt;imjournal&lt;/code&gt; module.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Rules in rsyslog use &lt;code&gt;&amp;lt;FACILITY&amp;gt;.&amp;lt;PRIORITY&amp;gt;&lt;/code&gt; selectors. Example configuration in &lt;code&gt;/etc/rsyslog.d/50-custom.conf&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>selinux-apparmor</title><link>https://blog.ulutasalperen.com/docs/linux/selinux-apparmor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/selinux-apparmor/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Mandatory access control on RHEL-based and Debian-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; SELinux modes, file contexts, booleans, denial analysis, AppArmor profiles, troubleshooting.&lt;/p&gt;&#10;&lt;p&gt;Traditional Unix permissions implement discretionary access control (DAC): the file owner decides who may read, write, or execute a resource. Mandatory access control (MAC) adds a system-wide policy that restricts programs to only the resources they are explicitly allowed to use, regardless of file ownership. SELinux enforces MAC with labels on processes and objects, while AppArmor enforces it with path-based profiles.&lt;/p&gt;</description></item><item><title>security-hardening</title><link>https://blog.ulutasalperen.com/docs/linux/security-hardening/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/security-hardening/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux server hardening&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Baseline hardening, fail2ban, automatic security updates, listening ports, login auditing.&lt;/p&gt;&#10;&lt;p&gt;Server hardening reduces the attack surface before an incident occurs: keep the system patched, expose only required services, restrict administrative access, and monitor authentication attempts. Fail2ban complements these measures by banning hosts that repeatedly fail authentication. Treat the steps below as a baseline and adjust them to the role of each server.&lt;/p&gt;</description></item><item><title>package-management</title><link>https://blog.ulutasalperen.com/docs/linux/package-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/package-management/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Debian-based and RHEL-based Linux distributions&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Package installation, removal, upgrades, repository management, version locking, and low-level package tools.&lt;/p&gt;&#10;&lt;h1 id="part-1-debian-based-systems"&gt;Part 1: Debian-Based Systems&lt;a class="anchor" href="#part-1-debian-based-systems"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt; Debian, Ubuntu&lt;/p&gt;&#10;&lt;h2 id="1-refresh-the-package-index"&gt;1. Refresh the Package Index&lt;a class="anchor" href="#1-refresh-the-package-index"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Run as root before installing or upgrading:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt update&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;apt update&lt;/code&gt; downloads repository metadata only. It does not install or upgrade packages.&lt;/p&gt;&#10;&lt;h2 id="2-install-packages"&gt;2. Install Packages&lt;a class="anchor" href="#2-install-packages"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt install &amp;lt;PACKAGE_NAME&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;-y&lt;/code&gt;: Confirms all prompts automatically. Use only in scripts and after reviewing the transaction.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;--no-install-recommends&lt;/code&gt;: Installs hard dependencies only, skipping recommended packages.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;--dry-run&lt;/code&gt;: Simulates the transaction without changing the system.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="3-remove-packages"&gt;3. Remove Packages&lt;a class="anchor" href="#3-remove-packages"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Remove package binaries but keep configuration files:&lt;/p&gt;</description></item><item><title>performance-triage</title><link>https://blog.ulutasalperen.com/docs/linux/performance-triage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/performance-triage/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Distro-independent performance triage on Linux servers&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; Load average, CPU versus I/O wait, memory and swap pressure, disk I/O, culprit processes.&lt;/p&gt;&#10;&lt;p&gt;Performance triage answers one question first: is the system CPU-bound, memory-bound, or I/O-bound? Measure before changing anything, because tuning the wrong resource hides the real bottleneck. The workflow below uses tools available on Debian-based and RHEL-based systems alike.&lt;/p&gt;&#10;&lt;h2 id="1-read-the-load-average"&gt;1. Read the Load Average&lt;a class="anchor" href="#1-read-the-load-average"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Inspect the load average:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;uptime&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /proc/loadavg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected output:&lt;/p&gt;</description></item><item><title>boot-process</title><link>https://blog.ulutasalperen.com/docs/linux/boot-process/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/linux/boot-process/</guid><description>&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Boot chain, systemd targets, and GRUB configuration on Debian-based and RHEL-based systems&lt;br&gt;&#10;&lt;strong&gt;Topics:&lt;/strong&gt; UEFI and GRUB, kernel and initramfs, systemd targets, boot timing, kernel parameters, boot recovery.&lt;/p&gt;&#10;&lt;p&gt;A Linux server boots through a fixed chain: the firmware (UEFI or BIOS) starts the GRUB 2 bootloader, GRUB loads the kernel and initramfs, the kernel hands control to systemd, systemd reaches the default target, and a login prompt appears. Each stage fails in a distinct way, so knowing the chain narrows a boot problem quickly. The steps below cover diagnosis first, then GRUB configuration per distribution family, then recovery.&lt;/p&gt;</description></item></channel></rss>