Every command that is typed into a Linux system’s terminal is typically stored in the history buffer for a period of time. This explains why pressing the up arrow in terminal will let you cycle through past commands that have been executed. This buffer of past commands can be customized according to an administrator’s needs, allowing us to vary the number of saved commands, clear the current history, or change other settings.
Commands
How to install missing ifconfig command on Linux
Most of us longtime Linux users have the ifconfig
command seared into our brain, after years of repetitive use. It comes as a shock to some when they type the command and are met with an error message (ifconfig command not found). Indeed, the command has become deprecated, but it’s still possible to install the ifconfig command. The newer alternative is the ip command, which has new functions but also a different syntax that takes some getting used to.
Understanding Linux Permissions: The Differences between chmod and chown
If you are just starting to learn about file permissions on a Linux system, the chmod and chown commands will be your starting point for granting or revoking file permissions for user accounts. chmod and chown are completely different commands, yet they go hand in hand when it comes to modifying file permissions on the Linux file system. The basic summary is that chown
can change the owner of a file, and chmod
can change the permissions of the file, but this explanation is only scratching the surface.
Stat command: Usage and examples
The stat Linux command is one of the best ways to view the full details of any file that is stored on a Linux system. It is installed by default on all distributions, so there is nothing extra to install, and is basically a one stop shop for viewing file permissions, timestamp info like access times and modification times, and various other metadata for any file on your system. It also comes with a few handy options, allowing us to tailor the output for specific needs, and view information about all file types, including symbolic links, pseudo files, and others.
Retrieving File Permissions in Octal Mode Using the Command Line
File permissions on a Linux system can be represented in either symbolic mode or octal mode. Using octal mode to represent file permissions is a little more succinct, since we can usually list all relevant file permissions with just three numbers. These numbers represent the owner, group, and other user permissions for any file or directory on Linux. In this tutorial, you will see how to get a listing of file permissions in octal mode representation on the Linux command line.
How to get statistics about a command execution with GNU time
GNU time is a really handy utility available in the repositories of every Linux distribution: we can use it to retrieve information about the “real”, “user”, and “system” execution times of a command, and, more generally, to check the amount of system resources used by it.
How to use xargs to build command lines from standard input
Even the most basic installation of any Linux distribution comes with a set of really useful utilities: “xargs” is undoubtedly one of those. By using xargs we can build and execute command lines using items from standard input as arguments of a command. This is especially useful when dealing with programs which don’t read standard input directly.
How to orchestrate Borg backups with Borgmatic
Borgmatic is a free and open source configuration-driven wrapper around Borg, the secure and space-efficient archiver. Borgmatic allows us to orchestrate Borg backups by setting redundancy, rotations, hooks and many other things in a central place: an human-friendly and very well commented configuration file.
How to use xclip on Linux
The xclip tool can be used to interact with the system clipboard from the command line. This can come in handy in instances where you want to send information directly to the user’s clipboard, without requiring that they highlight and copy the text themselves. It also works in the other direction, so the xclip
command can check the contents of the clipboard.
Linux xxd command explained
Once a program has been compiled, it is not easy to get a peek at the source code or to manipulate its behavior. But there is one thing we can do, which is look at the hexadecimal values inside the binary files. We can also make changes to the data and compile it back to a binary file. This will sometimes reveal information about a file, or allow us to modify its behavior if we can manage to edit the right bit.
How to check command version on Linux
When working with various Linux commands, you may be wondering what version of the command you are using. Of course, the version relates to the binary executable file itself, and traditionally is maintained by the system package manager, which is responsible for checking on updated versions and installing them at the user’s discretion. Commands in Linux typically undergo slow, subtle changes. Some commands have not changed much at all since the 70s, when they were introduced on Unix. Others have new versions developed regularly, and you need to check your version to know which features it has. In this tutorial, you will learn how to check the version of a command on a Linux system.
How to extract text from PDF document
PDF documents are commonly used to hold lengthy amounts of text, especially for formal matters like contracts or terms and conditions. These PDF documents can prove unwieldy in certain scenarios, since a PDF reader application is required to open them, and a PDF editor must be used for changing the contents.