How to find file in Linux

How to find file in Linux

If you need to search for one or more particular files, Linux systems have a few powerful methods for locating them, such as the find and locate commands. Searching for a file with a specific name can be done, but you can also search for files that follow certain naming patterns. This can be broadened all the way to finding files based on file size, file extension, or a lot of other options.

It’s also possible to find a particular directory or search for files based on their contents, such as finding all files containing a specific text, but we cover those topics in separate guides.

In this tutorial, you’ll learn how to find a file in Linux by using the command line and GUI. Let’s get started.

In this tutorial you will learn:

  • How to find a file in Linux via command line
  • How to find a file in Linux via GUI

Read more

Use killall to end a process by name on Linux

How to use killall command on Linux

When it comes to killing a running process, there are a few options available on Linux systems. One such option is the killall command, which differs from the kill command, as we’ll see below.

In this guide, you’ll learn how to use the killall command to end running processes on Linux. You’ll also be given various examples that you can apply to your own system.

In this tutorial you will learn:

  • How does the killall command work?
  • killall command examples

Read more

Unzip command on Linux

How to unzip a zip file from command line and GUI

You might think that zip files belong on Windows, not Linux systems. Still, it’s a popular compression method and chances are that you’ll run across them online from time to time. Either that, or your Windows buddy will send you a zip file that you want to open.

In this guide, we’ll show you how to unzip (decompress) zip files on Linux. You’ll learn a command line method as well as a GUI method in the step by step instructions below.

In this tutorial you will learn:

  • How to unzip a zip file via command line
  • How to unzip a zip file via GUI

Read more

Changing hostname on Linux

How to change hostname on 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.”

In this guide, we’ll show you how to change the hostname on Linux. This can be done via command line or from GUI, and we’ll be showing the methods for both. If you can’t easily identify a system’s purpose from the hostname, it’s time to change it.

In this tutorial you will learn:

  • How to change hostname from command line
  • How to change hostname from GNOME 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

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

Bash regexps for beginners with examples

Bash regexps for beginners with examples

Using regular expressions in Bash provides you with plenty of power to parse nearly every conceivable text string (or even full documents), and transform them into nearly any output desirable. If you regularly use Bash, or if you regularly work with lists, textual strings, or documents in Linux, you will find that many jobs can be simplified by learning how to use regular expressions in Bash. Continue reading to learn basic Bash regular expression skills! If you are already familiar with basic regular expressions in Bash or another coding language, see our more advanced bash regular expressions. If not, continue reading to learn basic Bash regular expression skills!

In this tutorial you will learn:

  • How to use regular expressions on the command line in Bash
  • How regular expressions can parse and transform any text string and/or document
  • Basic usage examples of regular expressions 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

GNU/Linux General Troubleshooting Guide for Beginners

GNU/Linux General Troubleshooting Guide for Beginners

In this guide, our goal is to learn about the tools and environment provided by a typical GNU/Linux system to be able to start troubleshooting even on an unknown machine. In this tutorial you will learn:

  • How to check disk space
  • How to check memory size
  • How to check system load
  • How to find and kill system processes
  • How to user logs to find relevant system troubleshooting information

Read more