List of services on Linux

How to use systemctl to list services on systemd Linux

systemd is a software suite that’s present on many Linux distributions. It’s not quite ubiquitous, but it’s a staple on the most popular distros, including Debian, Ubuntu, Fedora, Manjaro and Arch, and more.

What it’s best known for is having the ability to control processes running on a system. Using systemd, you can start or stop any service installed on Linux. It’s also an easy tool to list information about the services, such as if they are running, if they start automatically at boot up, etc. In this guide, we’ll show how to use systemd (specifically the systemctl command) to a see a list of services on Linux.

In this tutorial you will learn:

  • How to list services in systemd with systemctl command

Read more

How to remove a user on Linux

How to remove user on Linux system

User management is an important part of Linux administration. Sometimes you need to list the users on a system or disable a user account. Other times, you may need to delete a user account entirely, which is what we’ll be covering in this guide.

There are a couple of methods for deleting user accounts on a Linux system. One way to do it is via the command line, and the other method is via GUI, which varies depending on the desktop environment you’re running. We’ll be covering the command line method as well as removing a user in GNOME and KDE.

In this tutorial you will learn:

  • How to remove a user via command line
  • How to remove a user on GNOME GUI
  • How to remove a user on KDE GUI

Read more

List of users on a Linux system

How to list users on Linux

User management is an important part of Linux administration, so it’s essential to know about all the user accounts on a Linux system and how to disable user accounts, etc. In this guide, we’ll show you how to list the current users via command line and GUI. This will include a GNOME desktop environment as well as KDE.

In this tutorial you will learn:

  • How to list users via command line
  • How to list users on GNOME GUI
  • How to list users on KDE GUI

Read more

How to install, configure, and use mutt with a gmail account on Linux

How to install, configure, and use mutt with a gmail account on Linux

Email reader programs such as Thunderbird or Evolution are great, but sometimes they can feel bloated. If you found yourself working mainly from CLI, you may find useful to learn how to install and configure Mutt, a command line email client: that’s what we will do in this tutorial.

In this tutorial you will learn:

  • How to install Mutt
  • How to configure Mutt to be used with a gmail account
  • How to store sensitive information in an encrypted file and source it from the main Mutt configuration
  • How to setup some macros to easily switch between mailbox directories

Read more

Tips & Tricks with Netcat command on Linux

Tips & Tricks with Netcat command on Linux

Netcat is a versatile networking utility which can be used for reading from and writing to TCP and UDP connections on arbitrary ports (as with other utilities used on Linux, ports below 1024 require root/sudo privileges). By default netcat uses TCP connections, but UDP can be specified with the -u flag. Netcat can be used as both a server and a client. When used as a server the -l flag is used to listen for a connection. Similar to the cat command, netcat can receive information from stdin and write to stdout making it great for workflows involving pipes and redirects. The nc command is typically used to evoke netcat for ease of use.

Read more

How to trace system calls made by a process with strace on Linux

How to trace system calls made by a process with strace on Linux

There are times when it’s useful to inspect what a running application is doing under the hood, and what system calls it is performing during its execution. To accomplish such a task on Linux, we can use the strace utility. In this article we will see how to install it and we will learn its basic usage.

In this tutorial you will learn:

  • How to install strace
  • How to use strace to trace system calls made by a process
  • How to filter specifics system calls
  • How to attach to an already running process
  • How to generate a system call summary

Read more

systemd-logo

Introduction to the Systemd journal

Systemd is nowadays the init system adopted by almost all Linux distributions, from Red Hat Enterprise Linux to Debian and Ubuntu. One of the things that made Systemd the target of a lot of critics is that it tries to be a lot more than a simple init system and tries to re-invent some Linux subsystems.

The traditional logging system used on Linux, for example was rsyslog, a modern version of the traditional syslog. Systemd introduced its own logging system: it is implemented by a daemon, journald, which stores logs in binary format into a “journal”, which can be queried by the journalctl utility.

In this tutorial we will learn some parameters we can use to modify the journald daemon behavior, and some examples of how to query the journal and format the output resulting from said queries.

In this tutorial you will learn:

  • How to change default journald settings
  • How journald can coexist with syslog
  • How to query the journal and some ways to format the queries output

Read more

How to create compressed encrypted archives with tar and gpg

How to create compressed encrypted archives with tar and gpg

There are many reasons why you may want to create compressed encrypted file archives. You may want to create an encrypted backup of your personal files. Another possible scenario is that you may want to privately share content with a friend or colleague over the web or through cloud storage. Tar.gz files, or compressed tarballs, are created using the tar command. These tarballs are pretty much the standard go-to format for archives on GNU/Linux, however they are not encrypted. In the above scenarios that we mentioned it is often desirable to have encryption in order to secure your data. This is where gpg comes in.

Read more

Using GNU screen with examples

Using GNU screen with examples

Have you even been in the situation where you were running a 3 hour copy or script on a remote machine, only to find that it broke at 2h 45min because your network connection or SSH connection dropped momentarily? If so, you know how painful that feels 🙂 Welcome to GNU screen, the utility which allows you to start a separate shell which will not be interrupted if your network connection breaks. Read on to discover how to use it and more!

In this tutorial you will learn:

  • How to install and use the GNU screen utility
  • How to configure the GNU screen utility to function better
  • Basic usage examples on how to use the GNU screen utility from the Bash command line

Read more

xargs for beginners with examples

xargs for beginners with examples

Using xargs, described in the Linux xargs manual as a tool which builds and execute command lines from standard input, once can exert a significant amount of additional power over any other command executed on the Bash command line. Basically, xargs will take the output from any other tool, and use that as it’s own input for further processing and action (hence the reference to executing command lines in the manual). If this is your first few weeks or months with xargs, or you are only just starting, this is the best place for you to get into xargs.

In this tutorial you will learn:

  • How to use xargs from the command line in Bash
  • How xargs works, what it does, and how to use it well
  • Basic usage examples using xargs from the command line in Bash

Read more

Random Entropy in Bash

Random Entropy in Bash

When using random numbers in Bash, the question of random entropy will sooner or later come up. This article will help you understand what entropy is, how it can be modified and optimized in Bash, and how it will affect random number generation.

In this tutorial you will learn:

  • How to generate random entropy in Bash
  • How to pre-seed the random number generator in Bash
  • Examples demonstrating random entropy generation in Bash

Read more

How to use zip on Linux

How to use zip on Linux

Compressed files with the .zip extension are commonplace throughout Windows systems, as it’s been the native file compression method for the operating system since many years ago. On a Linux system, the nearest equivalent would have to be tar files and various methods of compression like gzip.

There are a few reasons why you may need to create or open .zip files on Linux. When sharing files with a Windows user, it’d definitely be better to send them a .zip file than a file with Linux based compression, and you may come across an occasional zip archive online or from a friend that you need to open.

In this guide, we’ll show you how to use zip on Linux to open or create compressed .zip archives on both the command line and GUI.

In this tutorial you will learn:

  • How to use zip and unzip via command line
  • How to use zip and unzip via GUI

Read more