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 […]
Category: Linux Command Line
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 […]
How to Use Vim Search and Replace in Linux
In all my years as a Linux admin, vim is the tool I’ve used most often. It’s the default text editor in Linux systems, and you’ll usually be working with file contents, from config files to log files, scripts, and more. If you work with multiple servers, then many of the config files will remain […]
How to Use sed to Replace Strings in Files
We often talk about the “sed” Linux tool on the NameHero blog because it is versatile and useful. Our tutorial on how to delete lines in sed shows you how to install sed and get started. In this article, we talk about using sed to replace text in files. Sed is uniquely suited for this […]
How to Use Tmux: The Complete Guide
In Linux, Tmux stands for “Terminal Multiplexer”, and we use it to run multiple commands from a single SSH session. Using tmux, we can have several windows open at the same time, running different tasks, and borrow some of the useful multi-tasking features from Windows. We’d written an earlier article on the basics of using […]
