System administration
Become a better system administrator by learning how to apply Linux security, shell scripting, and generic Linux concepts.
Set default file permissions on Linux with umask
Learn how to use umask to set the default file permissions in Linux. We look at examples, including how and where to implement them.
What is the difference between /dev/random and /dev/urandom?
Learn the difference between the Linux kernel random sources /dev/random and /dev/urandom and when to use which one.
How to clear systemd journal logs by time
Learn how to use the journalctl command to query the disk usage of the journal logs and how to clean or trim them by number, size, or age.
How to monitor disk activity (I/O) on Linux
Learn how to monitor a Linux system and focus on disk activity with tools like iotop, sar, vmstat, or iostat.
How to see the file type on Linux
Learn how to see the file type of normal and special files on a Linux system by using the file command.
How to see the size of a file
Learn how to see the size of a file on Linux systems using the ls or stat command.
How to display directory contents sorted by modification time
Learn how to sort the output of the ls command to list a directory contents by its modification time.
How to schedule a periodic task with systemd
Schedule a repeating task via systemd by using a timer. Learn how to configure and use it.
Systemd-analyze
The command systemd-analyze helps analyzing systemd components to optimize the system including performance and security.
How to check if systemd is being used or active
Learn how to quickly confirm that systemd is being used as your system and service manager.
How to add a SSH key to the SSH agent
Learn how to load and use your SSH key together with a SSH agent.
How to see all enabled services with systemctl
The systemctl command can be used to show all service units and filter those that are enabled.
Troubleshooting a failed systemd unit (with examples)
Learn how to troubleshoot failed systemd units, examples, possible causes, and how to resolve them.
What does systemctl daemon-reload do?
When making changes to systemd unit files, you may need to use systemctl daemon-reload. This article explains what happens next.
How to check if 'systemctl daemon-reload' is needed
When systemd units are changed, a 'systemctl daemon-reload' might be needed. Need to know if this is the case? Let's test for that.
How to see which syscalls are part of a systemd syscall filter set
Learn how to see what syscalls are part of a particular syscall filter set in systemd.
Systemd syscall filtering
Learn more about the system calls (syscalls) that systemd may use in commands and unit files, such as with SystemCallFilter property.
What is the difference between systemctl disable and systemctl mask?
Want to disable a service, but wondering the difference between systemctl disable and systemctl mask? This article shows the differences between the two.
How to use systemctl edit to change a service?
Learn how to edit an existing systemd service unit with the systemctl edit command.
How to see only running services with systemctl
The systemctl command can be used to filter its output and only show all running services.
Run0 cheat sheet
Learn how to get everything out of the run0 tool to increase your privilege level.
Run0: introduction and usage
Learn the goal and purpose of run0 and how to use it for elevating privileges.
How to disable the background color of run0
Learn how to disable the change of the background color when using run0.
How to see memory usage of a service with systemctl?
The systemctl command can be used to show the memory usage of a service managed by systemd.
How to see the active settings of a systemd unit
The systemctl command can be used to show the settings of a systemd unit, like a service.
How to override the settings of a systemd unit
The systemctl command can be used to override settings of a systemd unit, like a service.
Hardening nginx with systemd security features
Secure your nginx service by using security features provided by systemd.
Systemd features to secure units and services
Learn more about systemd features that help in securing units and services.
How to see the cgroup of a process
Learn how to find the control group (cgroup) of a process by using /proc, pidof, or ps.
How to see cgroup in ps output
Want to see the control group in the output of the ps command? Here is how to tune your command options to include that.
How to see the time synchronization details with timedatectl
Show time synchronization details with the systemd timedatectl command and related subcommands.
How to show the systemd machine ID
Find the machine ID that was generated by systemd.
How to see the dependencies of a systemd unit
The systemctl command has the list-dependencies option to show dependencies between units. But there are more options to query a little bit more information.
How to see the available systemd unit types
The systemctl command can be used to show all available systemd unit types.
How to see all active systemd units of one type
The systemctl command can be used to show all active systemd units of one particular type with the --type option.
How to limit the disk usage of the systemd journal
Learn how to define the maximum size that the systemd journal daemon may use for storing journals.
How to see the size of the systemd journal
Use the journalctl command to show the size of the systemd journal logs. In this article we look how journalctl vacuuming works.
How to see kernel messages with journalctl
Learn how to show all kernel events by using journalctl and filter out the kernel entries in the journal.
What is a systemd unit?
Learn more about systemd units and what they do.
How to see only recent journal entries
Learn how to filter journal entries by specifying a date or time interval.
How to see new log entries automatically with journalctl
Learn how to continuously show new log entries with journalctl like the tail -f command.
How to see logging for a specific unit or service
Limit the number of log entries from the systemd journal by filtering journalctl output by unit.
How to reload the systemd configuration
How can systemd be instructed to reload its configuration?
What is systemd?
Learn what systemd is and the main components of this system and service manager.
What is a masked systemd unit?
What does it mean when a systemd unit is masked? Learn about this state.
SSH ProxyJump option
Learn about the SSH client option ProxyJump, that allows using a bastion host or jump server to connect to other systems.
SSH ForwardAgent option
Learn about the ForwardAgent option, available values, the security risks, and how to configure it.
What is SSH agent forwarding?
Learn more about the SSH agent forwarding feature and what problems it tries to resolve.
How to start the SSH agent?
When the SSH agent is not running, how can you start it? In this article we will have a look at the options.
What is the purpose of the SSH agent?
What is the purpose of the SSH agent and when to use it?
How to disable the usage of the SSH agent
Learn how to disable the usage of the SSH agent when authenticating.
SSH IdentityAgent option
Learn about the IdentityAgent option, available values, and how to configure it.
/etc/ssh/ssh_config
The configuration file /etc/ssh/ssh_config contains settings related to the OpenSSH client. Learn more about this file its configuration.
SSH client configuration
Linux systems are usually managed remotely with SSH. Learn how to configure and optimize the SSH client and improve its security.
SSH configuration files
Learn about the locations where SSH client settings are configured and what precedence they take.
How to show all installed packages with pacman
Query the pacman package manager on systems like Arch to show installed packages.
SSH StrictHostKeyChecking option
Learn about the StrictHostKeyChecking option, available values, and how to configure it.
SSH PasswordAuthentication option
Learn about the PasswordAuthentication option, available values, and how to configure it.
How to stop all processes of a single user
Learn how to stop all processes of a single user using the killall command.
How to disable the SSH host key check?
Learn how to disable the SSH check of host authenticity and key fingerprint with ssh option StrictHostKeyChecking.
Change SSH server port number
Learn how to make changes to your SSH configuration to have it running on a different port than its default 22/TCP.
Configure a SSH welcome message or banner
Learn how to configure a welcome messages for users before or after logging in via SSH.
SSH escape sequences
Learn about the escape sequences that can be used with OpenSSH to initiate special commands.
How to terminate a SSH connection that does not respond to CTRL+C
Learn about SSH escape sequences and how they can help with terminating a SSH connection that does not respond to CTRL+C.
How to remove the passphrase from a SSH key
Remove the password or passphrase from a SSH key using the ssh-keygen command.
How to see the available SSH keys in the OpenSSH authentication agent
Show the available SSH keys that are loaded in the SSH authentication agent.
Kill
The kill command can be used on Linux systems to send a defined signal to a process. Learn how to use it and what signals are available.
What is a zombie process?
What is a zombie process on Linux and how to deal with it? In this article we will have a look at the details.
How to kill a zombie process
How to kill a zombie process if it does not respond to kill -9? Here are a few last steps that you can try.
How to show a running process name and its process ID (PID)
Find the process ID (PID) and process name on Linux with the help of the pgrep command.
How to find all process IDs by its process name
Discover the process ID (PID) on Linux for a running process by searching for its process name.
Linux process signals and their meaning
Want to know the difference between SIGHUP, SIGKILL, and SIGTERM? Learn about Linux process signals, including a list and description.
How to kill a running process by its name
Find and stop a running process on Linux by searching for its name using the killall or pkill command.
How to see the the network IP address of your system
Show the IP address of your system with the help of the ip command.
How to see the IP address of your internet connection
Show the IP address of your internet connection using the dig command.
How to see which DNS server is used
Find the active DNS server being used by reviewing the network configuration, including common commands to query this information.
How to find writable files
Learn how to the use the find command to find any files that are writable.
Apt-file
The command apt-file can help with discovering which files belong to a package or what package installed or provides them.
Apt cheat sheet
The package manager apt gots much more options than one could think. In this cheat sheet they get uncovered.
How to see the size of a directory
Learn how to see the size of a directory or folder on Linux systems using the du command.
How to see hidden files
Learn how to see any hidden files on the command line or in the terminal using the ls command.
How to see files great than a specific size
Learn how to see files smaller or bigger than a specific defined size on Linux, using the du command.
How to find when the last modification happened in a directory
Learn how to find the last modification time of a file or subdirectory in a specified directory on Linux.
How to see inode usage
Learn how to see inode usage on a Linux file system or mount point.
How to see used and free disk space
Learn how to see used and disk space of file systems or mount point on Linux systems.
How to find symbolic links that point to a directory
Learn how to use the find command to discover symbolic links that refer to a directory.
How to compare two directories and find the differences
Learn how to compare two directories and see their differences or what files they are having in common.
/etc/ssh/sshd_config
The configuration file /etc/ssh/sshd_config contains settings related to the OpenSSH server daemon. Learn more about this file its configuration.
Systemd timers
Learn about systemd timers, the unit type for scheduled tasks and how it differs from cron.
How to see the number of open connections on Linux
Show the number of open connections using the ss command on Linux.
How to see when a process was started
Show process details to learn more about when a process was started using the ps tool.
How to see when the system was started (uptime)
When did a system start? Learn how to query the boot time (uptime) of a system using commands like uptime and ps.
Smem
The command smem can help showing memory usage, including the usage of swap.
Iftop
The command iftop shows ongoing bandwidth usage on one or more network interfaces and is a great tool for troubleshooting network issues.
How to see active connections and bandwidth usage on Linux
Show actual bandwidth usage and active connections using the iftop tool on Linux.
Pidstat
The command pidstat provides details about CPU, memory, and disk activity by processes.
Troubleshooting CPU usage
Articles and information about troubleshooting system performance issues with focus on CPU usage.
Show to clear the DNS cache with systemd
Learn how to inspect and clear the DNS cache when using the systemd resolver daemon.
Resolvectl
The command resolvectl provides details about systemd-resolved, the name resolution daemon.
Network
Articles and information about troubleshooting network performance issues and monitoring network statistics
How to show network TCP statistics and counters
Show counters related to the TCP connections by using the nstat command. This small utility will quickly retrieve the related statistics and display them.
Lscpu
The lscpu command reports information about the CPU, such as architecture, vendor identification, virtualization features, cache, and even CPU vulnerabilities.
How to see CPU details
Show CPU details such as architecture, vendor, caches, virtualization options, and even known CPU vulnerabilities such as Meltdown and Spectre.
Vmstat
The command vmstat reports information about memory, paging, processes, disks, block IO, CPU activitiy, and traps.
Nstat
The command nstat provides network interface statistics and can be used for monitoring and troubleshooting.
Tcpdump cheat sheet
Get more information out of the tcpdump tool using this cheat sheet. Find everything that is going on the network and your Linux systems.
Methods to find the Linux distribution and version
Learn how to find the Linux distribution and version of a system. Use the right tool or file to find the relevant details.
Dmidecode cheat sheet
Want to see all hardware details of a system? Then dmidecode is your friend, helping to decode all information from the SMBIOS specification.
How to see memory information such as type and speed
Show memory information and details such as the number of banks in use, the memory type and speed.
How to securely delete a file and its contents
Need to delete the contents of a sensitive file? Instead of just deleting it with rm, look at this option first.
How to see the creation date of a file
Learn how to use the stat command to find the initial creation time of a file, also known as its birth time.
Understanding the output of the stat command
Learn everything about the output that the stat command returns. Great for forensics, intrusion detection, and system administration.
Tar cheat sheet
Become a master in archiving and compressing files using the tar tool with this cheat sheet.
What is a tainted kernel
Learn what it means when the Linux kernel is marked as tainted, including finding the cause.
How to find the specific cause of a tainted kernel
Learn what it means when the Linux kernel is marked as tainted and in particular the underlying cause.
Ip cheat sheet
Want to see or configure every piece of information about networking, including routing on Linux? Forget tools like netstat and learn using the ip command.
How to see errors and dropped packets on a network interface on Linux
Show the network link details using the ip command to find out if a network has errors or dropped packets on a Linux system.
How to see the default gateway on Linux
Show the network routing table to discover the default gateway used on a Linux system.
How to see which process is using a port
Show which process is already opened an UDP or TCP port on Linux by using the ss command.
Lsof cheat sheet
Get information about open files on Linux using the lsof command. This cheat sheet covers many common uses for using lsof and how to use it.
How to see open ports on Linux
Show which UDP/TCP ports are opened on a Linux system, including the related process. Use the ss tool to see more details about these sockets.
Ss cheat sheet
If you want to learn more about network connections on Linux, then ss is the tool to get the job done. Learn how to use it with this cheat sheet.
How to see the TTL value of a DNS record
Learn how to query the Time To Live (TTL) for a DNS record by using the dig tool.
How to show all installed packages on Ubuntu
Query the package manager to show installed packages on Ubuntu systems including version details.
List installed packages on a Linux system
Learn how to show all installed packages on Linux systems including AlmaLinux, Debian, OpenSUSE, and Ubuntu.
How to list all USB devices
Retrieve device information from USB hubs and devices using the lsusb command.
How to see the available hard disks
Show the available hard disks in a system by using the right Linux tool. There are multiple options to pick, so let's have a look.
How to see hard disk specifications and details
Show more detailed information about the available hard disks in the system. Specifications like speed, serial number, firmware, and other details.
How to see BIOS details
Show bios details from within a Linux system. Learn how to query these details and where to find more information.
Du cheat sheet
Get more out of the du utility with this cheat sheet. Use it as a reference to find often-used options or those that come handy in time.
How to find the biggest directories on disk
Find the biggest directories and files on disk by using the du command.
How to see all masked units with systemctl
Want to find all masked unit files? In this article we show how to do this with systemctl and query those units.
How to see the last X lines with journalctl
Limit the output from journalctl by defining the number of lines you want to see.
How to disable a systemd unit with systemctl
Want to disable a service or specific systemd unit? Use systemctl to configure units and disable it on boot or completely.
How to start and enable a unit with systemctl
Combine the start and enable command when using systemctl to get a unit like a service started at boot and right away.
How to show failed units with systemctl
Want to check the system for failed systemd units? In this article we show how to do this with systemctl and query the units with a failure state.
Find cheat sheet
The find utility is probably the best tool to find files on your system, but it has some learning curve. We help you to achieve that with this cheat sheet.
Systemd cheat sheet
Increase your system administration skills with this systemd cheat sheet, including how to configure and monitor systemd units.
Test web server caching with curl
Want to test your web server and see if static files are properly cached? Curl can help and with some scripting even automate the task for you.
Systemd units and their purpose
Which systemd unit types are available and what is their goal? In this article we cover them and show some useful commands related to these units.
Systemctl cheat sheet
Learn how to get every piece of information from systemd units, such as services and timers, including its configuration and status.
Journalctl cheat sheet
Learn how to get every piece of information from systemd journals with the journalctl command. This cheat sheet will help you with the task.
Adding the Expires header to improve caching static content in nginx
Want to improve caching on your nginx web server? Learn how to set the Expires header and enhance your nginx configuration.
Curl cheat sheet
One of the best HTTP clients is the open source tool curl. With ongoing development and new updates, it is worth getting everything out of this powerful tool!
AWK cheat sheet
When it comes to a powerful tools on Linux, AWK is definitely one to know. This cheat sheet explains the basics and shows many useful one-liners
How to see all virtual hosts in nginx
Want to see all configured virtual hosts on a server running nginx? Here is a method to achieve this quickly by using a default configuration option.
SELinux
SELinux is a well-known security framework on Linux systems. Let's have a look at the basics of this framework, such as its purpose and features.
Linux security frameworks
Linux security frameworks restrict unauthorized access by defining a policy and a set of predefined rules. In this article we look their purpose and how they work.
AppArmor
AppArmor is a profile-based security security framework for Linux. In this article we look at the basics of this security framework, its purpose and features.
How to change file permissions
Learn how to change the file permissions of files and directories on a Linux system. Follow the examples and make your system more secure.
Linux file permissions
Learn the basics of file permissions on Linux systems and common filesystems such as ext4, XFS, and ZFS. Guided by examples, everyone is able to learn how they work.
Introduction in Linux file permissions
Learn the basics of how a Linux system applies file permissions. We look at examples to demystify the permissions mean and learn to troubleshoot common issues.
How to find hard links or files that point to a specific file
Learn how to find hardlinks on a file system or which files they have in common. We will use the find command to get this information quickly available.
Linux file systems
All articles about the purpose of a file system and how it works. Learn how to become a specialist to further secure your system.
Shell scripting
From beginnergs up to advanced users, these articles will cover your needs when it comes to creating better shell scripts.
Processes
This section provides tips and tricks to deal with processes on Linux systems. Got another tip? Let it know!
Kill a process that won't respond to CTRL+C
Got a process that won't respond to CTRL+C? With this tip you can kill almost all processes without having to open a second terminal.
Linux tools to bulk rename files
Want to rename files in bulk, but looking for a good tool that can be used on Linux? This article has your covered, with several options.
Troubleshooting a full /boot partition on Ubuntu
Is your /boot partition full and apt can no longer install updates? Learn how to fix this issue and what you can do to prevent it.
Understanding what runs on your Linux system (and why)
Linux systems have a lot of processes running by default. Let's dive into how programs are started and how you can see all details of each running process.
Configure the time zone (TZ) on Linux systems
Having the right time zone on Linux systems helps with troubleshooting. Learn how to see and configure the right time zone on most Linux distributions.
Beginners guide to traffic filtering with nftables
The replacement of iptables is known as nftables. In this article, we learn to install nftables and configure it, to secure your Linux systems.
How to see the version of Oracle Linux
Oracle Linux is based on Red Hat Enterprise Linux. At first, it may be confusing to determine what specific Oracle version of the operating system is used.
Ubuntu system hardening guide for desktops and servers
Step by step guide to secure any Ubuntu desktop or server. Harden your Ubuntu during installation and afterwards with the available security tips.
Linux security guide: the extended version
Feeling overwhelmed with the options available to secure your Linux system? With this guide, we walk step-by-step through the option, tools, and resources.
Discover to which package a file belongs to
With the right Linux software tools, it is easy to find to which package a file belongs. Or the opposite, what files are part of an installed package.
How to use grep (with examples)
Grep is a powerful utility on Linux. Want to get more out of the tool? This article will show you how to use it including many practical examples.
How to solve an expired key (KEYEXPIRED) with apt
Software updates and package management is easy, until you get a KEYEXPIRED message. In this article we should how it happens and the way to solve it.
Troubleshooting Linux Time Synchronization with NTP
Time synchronization is an important system administration task for Linux systems. This guide explains how to configure, and also troubleshoot time issues.
Mosh, the SSH Alternative Option for System Administration
Learn about Mosh, an alternative for SSH. Let's dive into the reasons why it makes sense to learn about Mosh and how to use it.
Automatic Security Updates with DNF
The dnf package manager and dnf-automatic tool can be used for automated security patching on Linux systems. It requires only a few steps to set it up.
How to Disable “System program problem detected”
This article shows how to deal with the message System program problem detected
Find differences between two daily Lynis audits
It can be useful to see the differences between scans of Lynis, especially when running it daily. Learn how to do this with just a few steps
Missing Packages: Don’t Trust External Repositories!
Should you external repositories or not? In this article we look at why trusting external repositories might be a bad thing.
Monitor file access by Linux processes
Linux is powerful with the help of small utilities like lsof and strace. They help with monitoring disk and file activity, of new and running processes.
Installing ClamAV on CentOS 7 and Using Freshclam
By default a ClamAV installation on CentOS 7 is not working. In this blog post we reconfigure the required systemd and configuration files.
Determine which processes need a restart with checkrestart/needrestart
Just patching software packages is not enough. We cover some tools to determine which processes need a restart to complete software patch management.
Using SSH keys instead of passwords
Linux systems are usually managed remotely with SSH, often still using passwords. Time to switch over to SSH keys and here is how to do that.
SSH server configuration
Linux systems are usually managed remotely with SSH. Learn how to configure the SSH server daemon and improve its security.
Optimize SSL/TLS for Maximum Security and Speed
Everyone loves secure websites, as long as they are quick. Let's configure our website for maximum security and performance, at the same time.
Using unattended-upgrades on Debian and Ubuntu
To counter the biggest threat to software packages, Debian and Ubuntu based systems can use unattended-upgrades, to install security patches automatically.
Updating all OpenBSD packages with pkg_add
To ensure your system is secure and stable, package management is an important task. To achieve that, use pkg_add to update your installed OpenBSD packages.
Software Patch Management for Maximum Linux Security
Linux systems have a lot of software packages, resulting in regular upgrades and updates. Proper software patch management is key and we share how to do it.
Linux Audit Framework 101 – Basic Rules for Configuration
The Linux audit framework is a very powerful tool to monitor files, directories, and system calls. Learn how to configure it.
Tlsdate: The Secure Alternative for ntpd, ntpdate and rdate
Normal NTP can be difficult to set-up, especially for desktop systems which don't need a very accurate time. The tool tlsdate might be a great alternative.
How to check if your Arch Linux system needs a reboot
Want to check if a reboot of the system is needed on Arch Linux? Here is how that can be done including the relevant commands.
Perform NetBSD security audit with pkg_admin
NetBSD can perform a security audit on its packages with the pkg_admin tool. With the check and audit parameters it can perform security check in seconds.
Finding boot logs in systemd journals
This article shows how to find boot logs in the systemd journal. Learn the commands to query all relevant information.
Alternative for netstat: ss tool
Newer distributions do not use netstat anymore in favor of other tools like ss. This alternative tool can show in-depth information about socket statistics.
Linux capabilities 101
Introduction guide and tutorial about the inner workings of Linux capabilities and how these capabilities are applied when running Linux processes.
Auditing systemd: solving failed units with systemctl
Sometimes systemd units like services and timers may fail. Learn how to troubleshoot such issues and resolve them much easier.
How to clear the ARP cache on Linux?
Clearing the ARP cache on Linux is easy with the arp or ip utility. This blog post will help you to clear the cache with examples for both utilities.
Linux Capabilities: Hardening Linux binaries by removing setuid
Setuid binaries may be a risk for the system. We will investigate how to remove the setuid bit and use Linux capabilities instead, to reduce the risks.
GPG key generation: Not enough random bytes available
A common error when creating keys with GnuPG is: Not enough random bytes available. In this article we have a look at the cause and solution.
Alternatives to Bastille Linux: system hardening with Lynis
Bastille Linux is a great tool for hardening of Linux systems. With the project looking outdated (or even dead), there are new alternatives to Bastille.
OpenSCAP on CentOS 7 – Installing from source
Sometimes we need to build things from source. In this article we install OpenSCAP on CentOS 7 by compiling and installing it manually.
Yum plugins: Available plugins and built-in security support
To determine the available yum plugins, we analyze them for our goal: discovering if security support is in the yum plugins itself or built-in by default.
Protect Linux systems against SSLv3 Poodle vulnerability
The Poodle vulnerability was discovered in October 2014, putting all systems using SSL 3.0 at risk.
Installation of Lynis on Arch Linux systems
Lynis is available as a package for Arch Linux and installation is just a few steps. We look at the options to install Lynis on your favorite Linux distro.
How to solve Shellshock on Debian and Ubuntu
Also Debian and Ubuntu are vulnerable for Shellshock vulnerability in Bash. That's why it is important to run apt update and perform an upgrade of Bash.
Linux Security for DevOps
With security getting more and more attention, we focus on Linux security for DevOps. Also DevOps will need hardening, auditing and dealing with compliance.
Auditing Linux processes: The Deep Dive!
In-depth article about auditing Linux processes. Determination of running processes, memory and on-disk structure and the proper tools for analyzing them.