List of exit codes on Linux

List of exit codes on Linux

When a script or process exits or is terminated by some other means, it will have an exit code, which gives some indication about how or why the script or process ended. For example, an exit code of 0 means that the process exited without error – in other words, it completed its task and exited as expected. On the other hand, an exit code of 1 means that the process encountered some kind of error upon exiting.

Read more

System Clock vs Hardware Clock on Linux

System Clock vs Hardware Clock on Linux

The system clock and the hardware clock are used for different purposes on a Linux system. The system clock is maintained by the operating system, and the hardware clock is maintained in BIOS. The hardware clock will continue to keep time when the computer is powered off, thanks to the CMOS battery on the motherboard. The system clock maintains time by querying online time servers whenever the computer is powered on.

Read more

journalctl command usage and examples on Linux

journalctl command usage and examples on Linux

The journalctl command can be used to view all of the logs collected by systemd on a Linux system. This includes logs related to the system’s kernel, initrd, various services and applications, as well as systemd itself. The journalctl command makes querying all of these logs pretty painless, since systemd gathers and stores all these various logs in a central location for administrators to view.

Read more

Using Linux without GUI

Using Linux without GUI

A GUI is only a supplemental component of a Linux system, and is not essential. Many System Administrators will elect to keep their servers as command line only, as a GUI is completely unnecessary for running a plethora of different services. Everyday users, however, will usually want a GUI to perform basic functions like web browsing, watching videos, etc.

Read more

How to list all aliases on Linux

How to list all aliases on Linux

An alias on Linux allows a user to reference one command (usually a longer or more cumbersome command) to another (usually a shorter version of the command which is easier to type). This saves users a few keystrokes on the command line, or can also compensate for common typos. In this tutorial, you will learn how to list all the aliases that have been configured on a Linux system.

Read more

Clean up filenames with detox command line utility

Clean up filenames with detox command line utility

If you have spent much time on the command line to work with files in Linux, then you probably know about the pains of dealing with file names that contain spaces or any other strange characters. It can be tedious to escape certain file names or to work with a bunch of files that have inconsistent encoding in their file names. The detox command is a solution to this problem, as it converts all file names to a consistent format that make them easier to work with.

Read more