Using tcpdump command to capture network traffic on Linux

How to use tcpdump 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

Read more

What is dmesg, And How Do I Use It?

What is dmesg in Linux, And How Do I Use It?

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

Read more

Hung Linux System? How to Escape to the Command Line and More

Hung Linux System? How to Escape to the Command Line and More

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

Read more

Mounting and accessing an ISO file in Ubuntu Linux

How to open ISO files on Ubuntu Linux

An ISO file is an image file of a CD/DVD or other disc. It contains all the files from the disc, neatly packed into a single .iso file. This allows users to burn new copies of the disc, or they can open the ISO file to browse and copy its contents to their system.

An ISO file can also be mounted, which is the virtual equivalent to inserting a disc into your PC. The operating system will treat the ISO as a physical CD rom. In this guide, we’ll see how to open and mount an ISO file on Ubuntu Linux. This can be done from both command line and GUI, so we’ll be covering the steps for both methods.

In this tutorial you will learn:

  • How to open and mount an ISO file via GNOME GUI
  • How to open and mount an ISO file via command line
Mounting and accessing an ISO file in Ubuntu Linux

Mounting and accessing an ISO file in Ubuntu Linux

Read more

Adding a new user with custom home directory on Linux

How to create a user with a custom home directory on Linux

Normal user accounts on Linux have their own home directory. This is the location where all of the user account’s personal files typically reside, including their recent downloads, desktop contents, etc.

By default, a user’s home directory is usually located at /home/username where “username” is the name of the user account. However, you can actually place a user’s home directory just about anywhere you’d like. Linux gives us the option to choose a location for the home directory whenever we are creating a new user.

In this guide, we’ll go over the commands needed to specify a custom home directory when creating a new user on Linux.

In this tutorial you will learn:

  • How to create a user with a custom home directory
Adding a new user with custom home directory on Linux

Adding a new user with custom home directory on Linux

Read more

How to delete a file on Ubuntu Linux

How to delete file on Ubuntu Linux

Deleting a file in Linux is a fundamental task that every user will find themselves doing frequently. If you’ve recently installed Ubuntu Linux and are wondering how to delete files, we’ve got you covered in this guide.

In this tutorial, we’ll show how to delete files through GUI and command line on Ubuntu Linux. You’ll also see how permissions play a role in what files you’re able to delete or not.

In this tutorial you will learn:

  • How to delete files via GNOME GUI
  • How to delete files via command line
  • How permissions determine which files you can delete
How to delete a file on Ubuntu Linux

How to delete a file on Ubuntu Linux

Read more

Multiple commands showing the kernel version of a Linux system

How to check Kernel version 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

Read more

Disabling SELinux

How to disable SELinux

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

Read more

How to compare files using diff

How to compare files using diff

The diff utility is, in the vast majority of cases, installed by default in every Linux distribution out there. The program is used to calculate and display the differences between the contents of two files. It is mainly used when working with source code two compare the same versions of two files and highlight the differences between them. In this article we will learn the various modes in which diff can work and how to create a diff file which can later be applied as a patch with the patch utility.

In this tutorial you will learn:

  • How to use diff
  • How to display the output of diff on two columns when using diff in normal mode
  • How to read the diff output in normal, context and unified mode
  • How to create a diff file and apply it as a patch with the patch utility

Read more

Adding a new user account on AlmaLinux

How to add user on AlmaLinux

After installing AlmaLinux or migrating from CentOS to AlmaLinux, most users will eventually run into the need to do some user account management. This is especially true if you only have a root account on your system and need to setup one or more normal users.

In this guide, we’ll show you the step by step instructions to add a new user on an AlmaLinux system. This can be done through both GUI and command line. We’ll be covering both methods in this guide, so you can pick whichever option is most convenient for you.

In this tutorial you will learn:

  • How to add a new user on AlmaLinux from command line
  • How to add a new user on AlmaLinux from GNOME GUI
Adding a new user account on AlmaLinux

Adding a new user account on AlmaLinux

Read more

Changing the time zone via command line and GUI on AlmaLinux

How to set/change time zone on AlmaLinux

The objective of this guide is to show how to set the system time zone on AlmaLinux. This can be done from both GUI and command line, so we’ll be covering both methods in the following instructions.

Setting your system time and time zone is usually done when initially installing AlmaLinux or migrating from CentOS to AlmaLinux. If you skipped that step during installation, have switched time zones, or your system clock has drifted out of sync, we’ll help you get it fixed.

In this tutorial you will learn:

  • How to set time zone on AlmaLinux from GNOME GUI
  • How to set time zone on AlmaLinux from command line
Changing the time zone via command line and GUI on AlmaLinux

Changing the time zone via command line and GUI on AlmaLinux

Read more

How to download online videos from the command line using Youtube-dl

How to download online videos from the Linux command line using Youtube-dl

Nowadays a lot of video sharing platforms exist online. Some are really popular, like Youtube , and others are a little more “obscure”. Different types of content can be found on these platforms, but is not always possible to download them via the native web interface. In this tutorial we will see how to use a small command line utility: youtube-dl. This command line utility is able to download said videos for us using a very simple syntax. The following tutorial aims to demonstrate the capabilities of the program, however it should be used only where appropriate, in order to respect copyright laws.

In this tutorial you will learn:

  • How to install youtube-dl
  • How to download videos using youtube-dl
  • How to list the available formats for a video
  • How to download a specific format
  • How to stream a video directly to a media player
  • How to save downloaded files using template patterns
  • How to specify options into the youtube-dl configuration file
How to download online videos from the command line using Youtube-dl

How to download online videos from the command line using Youtube-dl

Read more