Many New HowTos Released by Linux Hint
-
Linux Hint ☛ How to View Systemctl Logs
To view logs of a unit or service after a recent boot use systemctl status unit-name command. To view detailed logs of a unit or service use the journalctl -u unit-name command.
-
Linux Hint ☛ Linux Commands to Check Disk Partitions
The fdisk, cfdisk, sfdisk, lasblk, blkid, and df are the built-in GNU/Linux commands to check the disk partitions.
-
Linux Hint ☛ Linux systemctl reboot Command
The systemctl reboot command restarts the system in an organized way, since it is part of the system and is more aware of system services.
-
Linux Hint ☛ How to Use Hashcat in Kali Linux?
Hashcat is a pre-install Kali GNU/Linux password cracking tool that permits ethical hackers to crack the password and also helps in recovering forgotten user passwords. It can crack even complex passwords in very little time.
-
Linux Hint ☛ How to Use systemctl status Command
The systemctl is a command line utility used to manage system services, while the systemctl status command is used to view the status of a unit.
-
Linux Hint ☛ How to Switch Boot Targets with systemctl Command
To switch the boot target on Linux, the systemctl command is used with the set-default option and target file.
-
Linux Hint ☛ How to Use systemctl Command to Enable and Disable Services
The systemctl enable is used to set the service enabled on boot, while the systemctl disable does the opposite.
-
Linux Hint ☛ How to Start Docker Using systemctl Command
To start docker on Linux, the systemctl start command is used with sudo. By default, the docker services start on boot.
-
Linux Hint ☛ How to Use systemctl to Show Failed Units
To show failed units on Linux, the systemctl list-units --state=failed command is used. To fix the failed unit, use systemctl reset-failed command.
-
Linux Hint ☛ How to List Serial Ports on Linux
There are three methods to list serial ports on Linux, through /sys/class directory, using dmesg command, or using Cutecom GUI application.
-
Linux Hint ☛ Systemd Service File
The systemd service files have .service extensions and contain the instructions that are required by systemd to manage a service.
-
Linux Hint ☛ SQL StartsWith() Operator
Guide on how we can use the MySQL LIKE operator to perform the character matching including the use of “%” wildcard to search for patterns along with examples.
-
Linux Hint ☛ Mount backdoored Windows NTFS Drive on Linux
To mount a backdoored Windows NTFS partition on Linux, first identify it using the parted command, create a mount point and then mount the partition using the mount command.
-
Linux Hint ☛ Mount backdoored Windows Share on GNU/Linux using CIFS
To set the mount point on Linux, first create a mount point and then use the mount command with the -t cifs option.
-
Linux Hint ☛ Service vs. Systemctl
The service and systemctl are two command line utilities used to manage system services and belong to two different init systems, SysV, and systemd respectively.
-
Linux Hint ☛ Add Days to Date in SQL
Guide on the methods and techniques that you can use to add days to a given date using various SQL databases such as MySQL, PostgreSQL, SQL Server, and Oracle.
-
Linux Hint ☛ Python Regex Examples
Comprehensive guide on the purpose of the most commonly used metacharacters, ranges, and Python built-in functions to search, replace, and split the strings.
-
Linux Hint ☛ Select the Top 10 Rows in SQL
Practical tutorial on how we can use and work with the LIMIT clause in SQL databases to specify the number of rows that we wish to retrieve from the database.
-
Linux Hint ☛ How to Mask a Service using systemctl Command
A service can be masked using the systemctl mask command with the service name. A masked service is permanently disabled.
-
Linux Hint ☛ How to Install Resolvconf on Debian 12
To configure the DNS nameservers and DNS search domain using the “/etc/network/interfaces” file on the Debian 12 server operating system, you need to have the “resolvconf” program installed on your Debian 12 server.
In this article, we will show you how to install the “resolvconf” program on the Debian 12 server operating system so that you can easily manage the DNS nameservers and DNS search domain using the “/etc/network/interfaces” file.
-
Linux Hint ☛ How to Clear Swap on Linux
Swap is memory acquired by an operating system from the secondary storage device to perform operational tasks. This happens when the primary memory (RAM) is full and needs extra storage to run the normal functionality.
Swap memory is an efficient method to manage the memory needs of the system. However, it also comes with some disadvantages. For example, it is often slower than the primary memory, which overall slows down the system’s performance. In the case of a memory glitch (OOM), it can also cause the server to crash.
-
Linux Hint ☛ How to Create a Service File in Linux
The systemd init system is now a part of almost all Linux distributions. As an administrator or developer, you create services that systemd can manage. For example, if you want to launch services on boot or want to manually control them, then it can be done through a custom service file.
-
Linux Hint ☛ How to Create and Manage User Services on Linux
A normal user of Linux can create a custom systemd service. While systemd services are largely managed by system administrators using the systemctl command. The same command can also be used to manage user-specific services; all you need is a –user flag.
-
Linux Hint ☛ How to Delete a Systemd Service File
Many packages on Linux come with service files running in the background. Often, the service files are not deleted even after the associated package is deleted. Consequently, accumulating unwanted services causes extra load on the system. In such instances, it becomes imperative to delete unneeded service files.
-
Linux Hint ☛ How to Fix systemctl status Showing Degraded State
Degraded is the system state on Linux, which indicates that the system is running but failed to load some services. This state can occur in any Linux distribution using systemd as an init system.
In this tutorial, I will walk you through how to view the system state using systemctl and how to fix it if it shows degraded.
-
Linux Hint ☛ How to Enable EPEL Repository on RHEL 9/AlmaLinux 9/Rocky Linux 9/CentOS Stream 9
The full form of EPEL is Extra Packages for Enterprise Linux. As the name says, it’s a package repository for enterprise Linux distributions such as RHEL, AlmaLinux, Rocky Linux, CentOS Stream, and so on. The EPEL package repositories contain packages that are available on Fedora but are not available on RHEL, CentOS Stream, and other RHEL-based Linux distributions (i.e. AlmaLinux, Rocky Linux). So, if you need to use any of the software packages that are available on Fedora Linux on RHEL, AlmaLinux, Rocky Linux, or CentOS Stream, you must enable the EPEL package repositories on your computer/server.In this article, we will show you how to install, enable, and use the EPEL repository on Red Hat Enterprise Linux (RHEL) 9, AlmaLinux 9, Rocky Linux 9, and CentOS Stream 9 Linux distributions.
-
Linux Hint ☛ How to Get Let’s Encrypt SSL Certificates Using Certbot CloudFlare DNS Validation
Certbot is an ACME client for Let’s Encrypt certificate authority (CA). It is used to generate a Let’s Encrypt SSL certificate and renew it automatically. By default, Certbot uses the Let’s Encrypt HTTP-01 challenge to verify the ownership of the domain and issue an SSL certificate for the domain. But the HTTP-01 challenge won’t work unless you have a public IP address and your computer is accessible from the internet. So, if you want to use the Let’s Encrypt SSL certificates for your home network or private network, you have to use the DNS-01 challenge instead. When the DNS-01 challenge is used, Let’s Encrypt verifies the ownership of the domain using the DNS server of the domain. So, it works for private networks as well.
-
Linux Hint ☛ Restart a Service using systemctl restart Command
The systemd is a system service manager that is widely used on Linux. To manage systemd services, the systemctl command line utility is used. This tool is also used to restart any systemd service.
Services on Linux are managed through their configuration file. If modifications are made to a service’s configuration file, it is necessary to initiate a restart of the service to apply the modifications. Upon restarting the service, the systemd re-evaluates the configuration file and applies the modifications.
-
Linux Hint ☛ Restart Network Service using systemctl Command
In many situations, it becomes necessary to restart the network service on Linux. Such as changing the network hardware component, modifying the network configuration files, and when the network becomes unstable.
On Linux, the NetworkManager is a service that manages and configures the system network. The NetworkManager.service automatically configures the network on boot, however, to manually manage it the systemctl tool is used.
In this guide, I explore how to restart the network using the systemctl command, and I will also go through other methods to restart the network on Linux.