Changing the hostname on Debian Linux

How to change hostname on Debian Linux

The hostname of a Linux system is important because it’s used to identify the device on a network. The hostname is also shown in other prominent places, such as in the terminal prompt. This gives you a constant reminder of which system you’re working with. It’s a real life saver when you’re managing multiple systems through SSH and those command line terminals start to blend together in your mind.

Of course, IP addresses are used when devices need to communicate with each other, but those can change frequently. Hostnames give us a way to know which device we’re interacting with either on the network or physically, without remembering a bunch of numbers that are subject to change. Thus, it’s important that your system bears a hostname which helps you to identify it quickly. For example, “backup-server” is much more informative than “server2.” If you can’t easily identify a system’s purpose from the hostname, it’s time to change it.

In this guide, we’ll show you how to change the hostname on Debian Linux. Changing the hostname can be done either by command line or GUI, and we’ll show you the steps for both methods below.

In this tutorial you will learn:

  • How to change the Debian hostname from command line
  • How to change the Debian hostname from GNOME GUI
Changing the hostname on Debian Linux

Changing the hostname on Debian Linux

Read more

Setting up a Samba share on AlmaLinux

How to setup Samba Server and client on AlmaLinux

File servers often need to accommodate a variety of different client systems. Running Samba allows Windows systems to connect and access files, as well as other Linux systems and MacOS. An alternative solution would be to run an FTP/SFTP server, which can also support the connections from many systems.

In this guide, we’ll go over the instructions to setup a Samba server on AlmaLinux. This is a great way to prepare your file server after installing AlmaLinux or migrating from CentOS to AlmaLinux. We’ll also see how to connect to the file server from other AlmaLinux client computers.

In this tutorial you will learn:

  • How to install Samba on AlmaLinux
  • How to allow Samba through firewalld
  • How to create a Samba user
  • How to configure Samba to share a directory
  • How to allow Samba through SELinux
  • How to connect to Samba server from AlmaLinux client
Setting up a Samba share on AlmaLinux

Setting up a Samba share on AlmaLinux

Read more

How to setup an FTP/SFTP server on AlmaLinux

How to setup FTP/SFTP server and client on AlmaLinux

FTP and SFTP are great protocols for downloading files from a remote or local server, or uploading files onto the server. FTP will suffice for some situations, but for connections over the internet, SFTP is recommended. In other words, FTP is not secure to use over an internet connection, since your credentials and data are transmitted without encryption. The ‘S’ in SFTP stands for ‘Secure’ and tunnels the FTP protocol through SSH, providing the encryption needed to establish a secure connection.

In this guide, we’ll go over the step by step instructions to setup an FTP server through VSFTP software or SFTP server through OpenSSH on AlmaLinux. Then, we’ll see how to connect to the server from a client AlmaLinux system. Setting up FTP/SFTP is a common step after installing AlmaLinux or migrating from CentOS to AlmaLinux.

In this tutorial you will learn:

  • How to setup an FTP server through VSFTPD
  • How to setup an SFTP server through OpenSSH
  • How to setup FTP and SFTP user accounts
  • How to allow FTP and SFTP through firewalld
  • How to connect to an FTP/SFTP server via command line
  • How to connect to an FTP/SFTP server via GNOME GUI
How to setup an FTP/SFTP server on AlmaLinux

How to setup an FTP/SFTP server on AlmaLinux

Read more

Putting a process into the background and moving it to the foreground

How to run command in background on Linux

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

Read more

Adding a directory to $PATH on Linux

How to add directory path to $PATH variable in Linux

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

Read more

Rsync examples in Linux

Rsync examples in 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 and this tutorial will help you to understand rsync better by providing you most common rsync examples administrators use to keep the data synchronised across multiple server/hosts.

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.

Read more

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

Using the ps command to identify running processes on a Linux system

How to use ps command in Linux: Beginners guide

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

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

Compressing a file with zstd on Linux

How to install and use ZSTD compression tool on Linux

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

Read more

Finding large files on Linux

How to find large files 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

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