On Debian systems like Ubuntu, we keep all our packages up to date by using the following commands: sudo apt updatesudo apt upgrade The first statement gets the list of all updated packages from the repositories and also compares what you have to what’s available, thereby creating a checklist for things to update and giving […]
How To Mimic The “foreach” Statement In Bash
You can issue commands to Linux directly on the command line, or you could put them in a script so that a bunch of commands can run at once. Even though you could, in theory, do away with scripts altogether and issue everything on the command line, scripts make sense for various reasons. One is […]
How to Install Nslookup on Ubuntu
Nslookup is a staple of Linux, and network administrators use it extensively to debug a variety of issues from e-mails not being delivered to websites not loading. DNS lookup is a fundamental part of our Internet infrastructure, and nslookup allows us to query a DNS server to see if a given domain name is properly […]
How to Find Large Files in Linux
After you’ve run a Linux server for a long time, it can be time to clean house and optimize your system. One of the easiest ways to get started is to search your system for large files and see where you can get rid of big stuff with the least impact. You might find that […]
How to Use the Gunzip Command in Linux
The gunzip command in Linux is used to unzip files that have been compressed using the “gzip” format. As such, it can’t unzip files that use a different compression mechanism like say, rar files or even the “zip” files that we see on Windows. Here, I’ll show you how to use the gunzip command to […]
How to Mount ISO Files in Linux
ISO files are a common way to distribute files and folders that would normally be stored on a physical disk. Unlike archive files like tar and zip files, ISO files are meant to be bootable. In this article, I’ll show you how to mount and unmount an ISO file on a Linux system so that […]
How To Use pkill In Linux And Why it’s Useful
Pkill is a Linux command-line utility that allows you to send signals to currently running processes. The most common signal is a kill signal, from whence comes its name. But killing a process is just one of the things you can do. You can also suspend and resume them, send user-defined signals, and even notify […]
How To Use The “cp” Linux Command With Omitting Directories
By default, the “cp” command in Linux copies both files and directories. Here’s a basic cp command: cp -r source_directory destination_directory The above command will copy all files and directories from “source_directory” to “destination_directory”. The “-r” flag stands for the “recursive” flag takes the directories one by one and copies the contents to the destination […]
How to Run a .sh File in Linux
A “sh” file in Linux is a script file by convention. It contains sequences of commands that we use for automation, or for running when the user isn’t around. In this article, I’ll explain how script files work, what you need to run them, and how to run them. Running a “sh” File in Linux […]
How To Restart Apache On Linux
Apache is one of the most popular web servers today. For a long time, it was utterly dominant over the alternatives, but NGINX is now around the same popularity. However, given that so many people use NGINX as a reverse proxy for an Apache backend server, it’s likely that Apache still maintains a solid lead […]