The tee command in Linux has a long pedigree, being developed way back in 1973. The fact that it’s been around for so long is a testament to its usefulness. But what’s even more surprising is how little it has changed since then. Linux’s philosophy of “do one thing and do it well”, has served […]
Nmap Scan Types: How to Scan a Server’s Network
In server security, you often need to perform a regular audit of your server, or one belonging to someone else to see what devices are connected to it. In this context, “devices” doesn’t just mean peripherals like keyboards, mice etc, which in any case are irrelevant for most servers, but also mounted devices, open ports, […]
How to Use the lsof Command in Linux
The “lsof” command in Linux stands for “List Open Files”. At any given time in Linux, thousands or even tens of thousands of files are open. Unlike in a system like Windows, Linux famously treats everything as a file, so this command allows you to examine every aspect of a system, regardless of whether it’s […]
Curl vs Wget: Choosing the Right Tool for the Job
If you’ve worked with Linux systems for even a short while, you’ve surely heard of the two tools we use for interacting with remote data – curl and wget. While for simple tasks, we can use them interchangeably, they occupy quite distinct spots in the workflow. While curl is used to transfer data to and […]
Jq Command: All you Need to Know
The “jq” command is a built-in tool in Linux that allows us to process JSON files with the same precision and flexibility that a tool like “awk” or “sed” does with text. We’ve seen in earlier tutorials how powerful “awk” can be, and “jq” brings a similar functionality to JSON. JSON is becoming more and […]
Using Bash Job Controls to Manage Multiple Processes
If you’ve been administering a Linux server for even a little while, you know that bash processes are sequential. You type a command, you wait for it to finish, and then you start another command. This isn’t a fundamental limitation of Linux, of course – Linux has been multitasking right from the beginning, stemming from […]
How to Use the Bash Select Loop in Linux
Linux offers numerous options, enabling you to customize the execution of your commands. The most common method is parameters. Even something as simple as the command to display the files in a directory – ls – has several parameters that customize its operation. For most scripts and commands, this is the best approach. Sometimes, however, […]
How to Use Process Substitution in Bash
Process Substitution in Bash As you become more proficient in administering Linux servers, the complexity of your commands will keep increasing. We already saw earlier how bash parameter expansion allows you to efficiently modify strings on the fly, without needing intermediate steps. Process substitution in bash takes this philosophy even further, eliminating many intermediate steps […]
All About Bash Parameter Expansion
In Linux commands and scripts, we often work with structured strings. For example, path names and file names are present in just about every command. In scripts, we constantly have to manipulate and parse log files with time stamps and error codes. These strings are not standardized – each application will write its log file […]
Systemd Service File Example – How it Works
As far as tools go in the Linux world, systemd is a relatively recent development, as it has been the default service manager on all Linux flavors since around 2015. Some of the older guides on the Internet refer to “init.d”, which was the directory that older systems relied on for their shell scripts. The […]
