The curl command on Linux systems is commonly used to download and upload files to or from a remote server. Another interesting thing we can use it for is to determine the public IP address of our system.

To do this, we can use curl to query websites that are configured to do nothing more than return the IP address of whichever system is connecting to it. This is one of the quickest and easiest ways to get your public IP address on the Linux command line. Follow along with us below and we'll show you a few examples.

In this tutorial you will learn:
  • How to install curl on major Linux distros
  • How to use curl to get public IP address
Using curl to get public IP address on the Linux command line
Using curl to get public IP address on the Linux command line

Running commands or processes in the background on a Linux system becomes a common task if you need to free up your terminal or disconnect from an SSH session. This is especially true of commands that run for a long time, either to listen for events or complete their lengthy task.

We have a few options on Linux for running commands in the background. In this guide, we'll cover a few different methods and show you how to use them through examples.

In this tutorial you will learn:
  • How to put a running command into the background
  • How to start a command in the background
  • How to close terminal and keep background job running
  • How to use the screen command
Putting a process into the background and moving it to the foreground
Putting a process into the background and moving it to the foreground

Logical Volume Manager (LVM) is used on Linux to manage hard drives and other storage devices. As the name implies, it can sort raw storage into logical volumes, making it easy to configure and use.

In this guide, you'll learn how LVM works on Linux systems. There's no better way to learn about LVM than simply running through an example, which is exactly what we'll do in the steps below. LVM works the same on any Linux distribution, so you can use any of the commands below on your own system.

Follow along with us as we use LVM to create partitions, physical volumes, a virtual group, logical volumes, and filesystems on a hard disk. We'll also show how to mount, extend, and remove our newly created logical volumes. By the end of this tutorial, you'll have a full understanding of how to use LVM and apply your own configurations.

In this tutorial you will learn:
  • How to install LVM on major Linux distros
  • How to create partitions
  • How to create physical volumes
  • How to create a virtual group
  • How to create logical volumes
  • How to create a filesystem on logical volumes
  • How to edit fstab to automatically mount partitions
  • How to mount logical volumes
  • How to extend a logical volume
  • How to remove a logical volume
Logical Volume Manager - Tutorial Scenario
Logical Volume Manager - Tutorial Scenario

A swapfile is a special file created on your computer’s disk, which will hold some of the memory contents. For example, when the main memory is starting to get full, the computer may write some of its memory to the swap space on the disk, which, albeit much slower than memory, will work as extra memory in the machine.

In this tutorial, you will learn:

  • How to identify if your system is swapping or not
  • The difference between a dedicated swap space partition and a swapfile
  • How to create a swapfile in Ubuntu and Linux Mint
  • How to configure the new swapfile into /etc/fstab
  • Example setting up a swapfile

Having a solid password manager is an absolute must these days, especially if you work in IT or regularly login to various social media. There are various options available under Linux, some more elegant than others. Out of all the options available, one that looks well crafted is gopass.

In this tutorial you will learn:

  • How to install gopass, the command line password manager
  • How to setup GPG and Git to work in conjunction with gopass
  • How to use gopass and what benefits and features it offers
  • How to enable the gopass browser extensions available for Firefox, Chrome and Chromium
  • How healthy the gopass and pass (on which it is based) communities and repositories are

When you type a command into a Linux terminal, what's really happening is that a program is being executed. Normally, to execute a custom program or script, we need to use its full path, such as /path/to/script.sh or just ./script.sh if we're already in its residing directory. Alternatively, we can execute a lot of commands without specifying paths, like uptime or date, etc.

The reason we don't need to specify paths for some commands is because of the $PATH variable. This is a variable that can be configured to tell our Linux system where to look for certain programs. That way, when typing date into the terminal, Linux checks the $PATH variable to see a list of directories to look for the program.

In this guide, we'll see how to add a directory to the $PATH variable on Linux. This will enable you to call on your program or script from anywhere in the system, without needing to specify the path to where you've stored it. Follow along with us as we show how to view the directories in $PATH, and add a directory either temporarily or permanently to the variable.

In this tutorial you will learn:
  • How to see currently configured directories in $PATH shell variable
  • How to temporarily add directory to $PATH
  • How to permanently add directory to $PATH
Adding a directory to $PATH on Linux
Adding a directory to $PATH on Linux

rsync stands for "remote sync" and is a powerful command line utility for synchronizing directories either on a local system or with remote machines. It's built into nearly every Linux system by default.

Some users mistakenly think of rsync as a file copying tool, like cp or scp. While there's some overlap, rsync excels in synchronization, specifically. In other words, it can take a source directory and make an identical destination directory. And when a file changes in the source directory, rsync can efficiently synchronize the contents to the destination directory, only transferring the bits that have changed. It's also a very secure utility, utilizing SSH for remote file transfers.

This makes rsync work very well as a backup tool, on top of file copying. Many backup utilities use rsync in some form or another, because some users don't bother to learn how to use the rsync command. In reality, it can be very complex, but rsync only gets complicated when you need to do specific things. If you learn about rsync from the basics, it's easy to wrap your head around.

In this guide, we'll learn how to use the rsync command through examples. Follow along on your own system if you have two directories that you'd like to keep in sync, and learn to master the rsync command.

In this tutorial you will learn:
  • rsync command line examples
rsync command on Linux
rsync command on Linux

The tcpdump command can be used to capture network traffic on a Linux system. It's a versatile command line utility that network administrators often rely on for troubleshooting.

What you'll come to find is that the amount of networking traffic captured on an interface can be easily overwhelming. tcmpdump makes our job a little easier by allowing us to isolate only the traffic we're interested in. Of course, in order to do this, you need to be familiar with the various flags and settings that go along with the command.

In this guide, you'll see how to use tcpdump through examples and explanations. Follow along on your own system if you want to learn to capture network traffic and master the tcpdump command.

In this tutorial you will learn:
  • How to install tcpdump on major Linux distros
  • tcpdump command examples
  • How to filter tcpdump traffic by port, protocol, source, and destination
  • How to write tcpdump captures to file
  • How to interpret tcpdump command output
Using tcpdump command to capture network traffic on Linux
Using tcpdump command to capture network traffic on Linux

The ps command is a default command line utility that can give us insight into the processes that are currently running on a Linux system. It can give us a lot of helpful information about these processes, including their PID (process ID), TTY, the user running a command or application, and more.

While this sounds pretty simple, make no mistake, the ps command can get quite complicated. It accepts a lot of different options, and can be useful in an incredible number of situations, even as part of a bash script.

In this tutorial, we'll introduce you to the ps command, and go over all of its most helpful options, including a lot of examples. By the end of reading this guide, you'll be armed with all the information you need in order to get the most out of this helpful command line tool.

In this tutorial you will learn:
  • How to list all the processes running on a system
  • How to use ps command through examples
Using the ps command to identify running processes on a Linux system
Using the ps command to identify running processes on a Linux system

If you have been using Linux for some time, you will likely have come to appreciate how stable and configurable it is, especially if you have some idea of managing a Linux system well. One such tool in managing a system is checking the dmesg kernel log regularly, and especially when there is a problem with the system. The first place to go to is often the dmesg log.

In this tutorial, you will learn:

  • How to access the dmesg kernel log
  • How to use standard date and timestamps instead of the default (the number seconds since kernel was started)
  • What sort of information you can see in the kernel log

It is not much fun when your Desktop hangs. The fear of lost work, the inability to continue work, and more. But it need not always be like this. Knowing just a little extra - a few shortcut keyboard combinations and a few commands at the command line - will hopefully get you back up and running quickly. It does not always work, but it works often.

In this tutorial, you will learn:

  • How to do basic immediate troubleshooting steps on a hung system
  • How to execute a memory test using a Memtest86+ ISO image burned to disc
  • A number of keyboard shortcuts that will empower you to handle hung systems better
  • Information about what avenues to take to do further troubleshooting steps

SELinux, which stands for Security Enhanced Linux, is an extra layer of security control built for Linux systems. The original version of SELinux was developed by the NSA. Other key contributors include Red Hat, which has enabled it by default in their own RHEL and its derivative Linux distributions.

Although SELinux can protect our system through access control for programs and system services, it's not always necessary to have it enabled. Some users may even find that it interferes with certain programs they try to install. Certain distributions also have their own recommended alternative to SELinux. For example, Ubuntu uses AppArmor, which should be used instead of SELinux. In this guide, we'll go over the step by step instructions to disable SELinux on all major Linux distributions.

In this tutorial you will learn:
  • How to check the status of SELinux
  • How to put SELinux in permissive mode
  • How to disable SELinux
Disabling SELinux
Disabling SELinux

Zstandard, often abbreviated as zstd, is a relatively new compression tool that premiered in 2015. It was created by engineers at Facebook, looking to improve on the speed and compression ratio of longstanding tools like gzip. It's quickly becoming a standard compression tool on many Linux distros, so now's a perfect time to learn about using it.

In this guide, we'll go over the instructions to install and use zstd on Linux, with command line examples that show you how to compress files as well as open archives that use zstd.

In this tutorial you will learn:
  • How to install Zstandard on major Linux distros
  • How to use Zstandard through command line examples
Compressing a file with zstd on Linux
Compressing a file with zstd on Linux

When it comes to tidying up your hard drive on Linux, either to free up space or to become more organized, it's helpful to identify which files are consuming the most storage space.

In this guide, we'll show you how to identify the largest files on your Linux system, through both command line and GUI methods. You can also see our other guide on checking disk usage by folder if you'd like to identify hefty directories instead of individual files.

In this tutorial you will learn:
  • How to find large files via command line with find
  • How to find large files via GUI with QDirStat
Finding large files on Linux
Finding large files on Linux

Every Linux system is running a Linux kernel, which serves as the foundation for a fully packaged operating system. As technology evolves, the Linux kernel receives updates to accommodate new hardware, features, and security patches.

Keeping your Linux kernel up to date is an important task for administrators and users alike. Do you know what kernel version your Linux distribution is running? In this guide, we'll show you how to find the Linux kernel version through various command line utilities.

In this tutorial you will learn:
  • How to check kernel version with uname, hostnamectl, and /proc/version
Multiple commands showing the kernel version of a Linux system
Multiple commands showing the kernel version of a Linux system

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: