Bash Script Comment Example

How to write comments in Bash Scripts

Well you have written an awesome Bash script. It works perfectly and perhaps there is no need to add new functionality. Well, maybe not for now, at least! At this stage you are happy with the script. However, after few months you reopen your bash script again to add new feature and you get a headache to figure out on how the script actually works. Hence, you need to spend additional energy and time before you can actually start editing the script in order to add new feature.

Well, at this point you regret that you did not put some comments ( notes ) into the script to remind you of how the bash script is structured. Not only that Bash comments serve as excellent notes for you or anybody else who might work with your script they may be to some extend also used as a basic bash script debugging tool.

In this tutorial you will learn:

  • How to comment on bash command line
  • How to write comment bash scripts
  • How to create multiple line comments

Read more

VIM text editor on RHEL 8 Linux Server/Workstation.

How to install vim on RHEL 8 / CentOS 8

The command line vim text editor utility is an invaluable tool for any system administrator. The vim editor can be installed with a single dnf command in case it is currently unavailable on your RHEL 8 / CentOS 8 Linux system.

In this tutorial you will learn:

  • How to install vim text editor on RHEL 8 / CentOS 8.
  • How to set vim as the system wide default text editor.
  • How to set vim as the user default text editor.

Read more

This executable .bin file launched a GUI installer for a Linux game

How to install bin file in RHEL 8 / CentOS 8 Linux

Some software packages for RHEL 8 / CentOS 8 come from commercial vendors such as game companies that provide closed-source binary packages or installers that you can run and enjoy in Linux. These installers often come either in .sh form or .bin form. Both are executable installers that you can launch in RHEL 8. If you have downloaded a .bin file and don’t know how to run it follow these steps.

In this tutorial you will learn:

  • How to make .bin files executable using the command line
  • How to install .bin files in RHEL 8

Read more

File conversion with alien doesn't take long

How to install deb file in RHEL 8 / CentOS 8 Linux

There may come a time when that package you want to install in RHEL 8 / CentOS 8 is simply not available as a RPM file. The alternative is to download the source and compile it yourself, or – alternatively – generate a RPM file from that source code later on.

But there is another way. Given the fact that Debian-based distributions have way more users than RPM-based ones, the number of available packages in their repositories is greater. Chances are you will be able to find a DEB file for that package you want. Here is how to install that DEB file in RedHat Linux with the help of a small utility called alien.

In this tutorial you will learn:

  • How to install alien in RHEL 8 / CentOS 8
  • How to convert a DEB package to a RPM one

Read more

rpm-manpage

How to install packages on RHEL 8 / CentOS 8 Linux System

All modern linux distributions organize software in packages which contain applications binaries, files, metadata and information about the package dependencies, possible conflicts with other packages etc. The core Rhel package manager is called rpm itself, and it is the tool used also by dnf, the higher level package manager, which is capable to manage dependencies. A relatively recent technology , flatpak, let us install also sandboxed applications together with their runtimes.

In this tutorial you will learn:

  • The three main ways to install a package using rpm
  • How to install packages using dnf
  • How to install applications graphically from the gnome-software utility
  • How to install sandboxed applications with flatpak

rpm-manpage

The rpm package manager manual

Read more

Check hostname on RHEL 8 Linux system using hostnamectl command

RHEL 8 / CentOS 8 change hostname

A hostname is the label or name linked to a device on a network. Its main purpose is to recognize a device on a specific network or over the internet. There are three different hostname types:

  • Static – Most of the time you will be interested in this type of hostname which is defined by user and the /etc/hostname configuration file.
  • Transient – This type of hostname is defined within kernel space and by default it is set to be the same as the static hostname. Transient hostnames can be set/updated by DHCP or mDNS at runtime.
  • Pretty – Pretty hostname allows for additional characters as per UTF8 character set hence serving rather only for presentation purposes. The pretty hostname also allows to include spaces.

This article will explain how to change or set hostname on RHEL 8 / CentOS 8 Linux server or workstation. To change hostname you will use the hostnamectl command.

In this tutorial you will learn:

  • How to change the static hostname.
  • How to change the transient hostname.
  • How to change the pretty hostname.
  • How to check the current hostname.

Read more

Debian package

Easy way to create a Debian package and local package repository

This article describes a simple way to create a home made debian package and include it into a local package repository. Although we could use an existing Debian/Ubuntu package, we will start from scratch by creating and packaging our own trivial application. Once our package is ready, we will include it into our local package repository. This article illustrates a very simplistic approach, however it may serve as a template in many different scenarios.

In this tutorial you will learn:

  • How to create a trivial debian package
  • How to create a local debian repository
  • How to add the repository to the list of software sources

Read more

Check Linux Mint version from command line

Check Linux Mint Version

There are number of ways on how to check Linux Mint version. Since Linux Mint comes with number of available Desktops the graphical user interface may differ from user to user hence the procedure is also different. From this reason the easiest and perhaps even recommend solution is to simply open up a command line terminal and execute the following command cat /etc/issue.

To check a version of other Linux distributions visit our how to check Linux version guide.

In this tutorial you will learn:

  • How to check Linux Mint version from graphical user interface
  • How to check Linux Mint version from the command line

Read more