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 […]
How to Tar and Gzip a Folder
In server environments, we often need to replicate folders across locations. For example, one super common use case is backup, where you periodically backup many log files. Another example is where you need to move the source code of an entire project from one server to another. In such situations, you need to mimic the […]
How Curl Follows Redirects on Linux
Curl is one of the most ubiquitous tools on Linux. It comes pre-installed with every flavor, and we often use it in demos or for downloading packages from the Internet. By design, though, the tool doesn’t automatically follow redirects. There are reasons for this behavior, having to do with security. Phishing attacks these days rely […]
How to Use Ufw to Open Port 80 in Linux
In the backend, Linux systems use a tool called iptables to manage firewall rules. This tool is comprehensive and powerful, but unfortunately, confusing as hell. If we wanted to perform the same operation in iptables that we want to perform in ufw, it’s a lot more complicated, even though ufw is just a wrapper around […]
How to Prune Unused Images in Docker
At NameHero, we’re big fans of docker, and have multiple docker tutorials to help you get started. However, there can also be too much of a good thing, as it’s very easy to download a docker image and then forget about it after testing it for a while. Because docker images can replicate entire systems […]
Using Systemctl to Enable Services on Boot on Linux
A service on Linux is a process that runs in the background that you can start, stop, enable, and disable. For modern operating systems, we interact with them using the “systemctl” tool, which interfaces with the systemd subsystem, which in turn manages the “init” system and service manager. As Linux admins, we don’t need to […]
How to Use zsh Syntax Highlighting
In an earlier post, we discussed the basics of zsh, what it is, and how to get started. Today we’ll look at syntax highlighting in zsh, its meaning, and how to implement it. I’ll also explain why it doesn’t work well with bash, even though we can get it to work in a “hacky” way. […]
How to Use the xargs Command in Linux
In Linux, we often need to feed one command’s output into another. The most well-known example is grep, which uses the pipe (|) operator to receive input and then search that input for a specific pattern. I’ve written earlier about using the pipe command with Linux, and we’re all familiar with how it works. Unfortunately, […]
