This tutorial will explore the bash printf command with syntax examples on Linux systems. When writing bash scripts, most of us by default use the echo
command as a means to print to standard output stream.
Luke Reynolds
VIM tutorial for beginners
The Vim editor (and its predecessor, vi) is a command line editor for Linux systems. It has a long standing reputation as being the most powerful text editor on Linux. After mastering it, many users will even claim that it is far speedier and more convenient to use than a typical GUI editor packed with lots of features in its menus.
How to encrypt partition in Linux
One of the best ways to protect your files on a Linux system is to enable hard disk encryption. It’s possible to encrypt an entire hard drive or partition, which will keep every file that resides there safe. Without the correct decryption key, prying eyes will only be able to see cryptic gibberish when they try to read your files.
In this guide, we’ll go over the step by step instructions of using LUKS to encrypt a Linux partition. Regardless of what Linux distro you’re running, these steps should work the same. Follow along with us below to get partition encryption configured on your own system.
In this tutorial you will learn:
- How to install cryptsetup on major Linux distros
- How to create an encrypted partition
- How to mount or unmount encrypted partition
- How to setup disk encryption during Linux install
Setup Bootsplash on Ubuntu/Debian – grub silent or verbose boot mode
The splash screen of a Linux system, which is the first screen you see when the operating system is booting up, is fully customizable.
Enable SSH port forwarding on Linux
Most Linux users are familiar with the SSH protocol as it allows remote management of any Linux system. It’s also commonly used for SFTP to download or upload files. SSH is known as a very secure protocol because it encrypts traffic end to end. But the encrypted tunnels it creates are actually quite versatile and can be used for more than just remote server management or file transfer.
SSH port forwarding can be used to encrypt the traffic between two systems for pretty much any protocol. This is accomplished by creating a secure tunnel and then routing another protocol’s traffic through that tunnel. By principle, it works very similarly to a VPN.
In this guide, we’ll go over the step by step instructions to show you how to use SSH port forwarding to create a secure tunnel for some other application. As an example, we’ll create port forwarding for the telnet protocol, which is usually avoided because of how it transfers data in clear text. This will secure the protocol and make it safe to use.
In this tutorial you will learn:
- How to use SSH port forwarding
- How to create a persistent SSH tunnel
aria2 – all in one command line download tool
aria2 is a command line tool for Linux systems that can download files using a variety of protocols, including HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. It’s diverse download capabilities make it an all-in-one tool for downloading files on Linux.
Most users know about downloading files from the command line by using wget or curl. aria2 has a few advantages over both tools, because it has increased potential for greater download speed by downloading from more than one source in the single session. aria2 can also pause and resume downloads.
In this guide, we’ll show you how to install aria2 on major Linux distros, then give you some command line examples so you see how to download various file types with the program. By the end of this guide, you’ll know how to use aria2 to download files through various protocols, and pause or resume downloads.
In this tutorial you will learn:
- How to install aria2 on major Linux distros
- aria2 command line usage examples
- How to download a file from multiple mirrors
- How to pause or resume downloads in aria2
Linux Software Raid 1 Setup
RAID 1 is a hard disk configuration where the contents from one hard disk are mirrored onto another. This provides the user with some redundancy in case a disk fails. On your Linux system, the two hard drives are represented as a single file system. But in the background, making changes to your files is actually writing the changes to two disks at the same time. You can also add more than two disks to the configuration, as long as you keep the number even. Otherwise, something like RAID 5 will be more suitable.
There are many ways to configure a RAID setup. One of the easiest and most accessible ways is through the mdadm software package, which can be installed and used on any major Linux distribution. This is easier than some other RAID setups, since it doesn’t require any special hardware (like a RAID controller) and isn’t that hard to configure.
In this guide, we’ll go through the step by step instructions to install and setup mdadm on Linux, and create a RAID 1 configuration for two hard disks. Our example scenario will consist of two empty hard disks that are each 10 GB in size. This is in addition to our main hard disk, which is just used for the operating system.
Strictly speaking, RAID 1 is not a proper backup solution. It does provide some protection from disk failure, but what if you accidentally delete a file or a virus corrupts multiple files? Those undesirable changes are instantly written to both disks. RAID 1 provides high availability, but you shouldn’t use it as your only backup solution.
In this tutorial you will learn:
- How to install mdadm on major Linux distros
- How to partition hard disks for RAID setup
- How to create a new RAID device in mdadm and mount it
- How to keep the RAID array mount persistent
Installation of Concrete5 CMS on Fedora Linux
Concrete5 is a CMS (content management system) which allows users to edit any page via editing toolbar and change its content or design without reading complicated manuals or navigating a complex administration back-end.
In this article, we’ll go over the step by step to install Concrete5 CMS on Fedora Linux. This will include setting up Apache as an HTTP server, various PHP modules, and MariaDB to host the database.
In this tutorial you will learn:
- How to install prerequisite packages for Concrete5 CMS
- How to setup a MariaDB database and user for Concrete5
- How to install and configure Concrete5 CMS
Recover – Reset Forgotten Linux Root Password
The root account, sometimes called super user, is the admin account on a Linux system, and is essential for performing all kinds of administrative tasks. You’ll need access to it in order to install or remove packages, manage other user accounts, and a lot more things. Anytime you access the root account, either through the su
or sudo
commands, you’ll be prompted for the root password.
If you have forgotten the password to your system’s root account, you don’t necessarily have to go back to square one and reinstall the whole operating system. It’s possible to recover and reset the root password, even without the old password. In this guide, we’ll take you through the step by step instructions of recovering a forgotten root password on Linux. This will work regardless of the Linux distribution you’re running, as long as its using the GRUB bootloader. Other bootloaders will have similar instructions.
In this tutorial you will learn:
- How to reset a forgotten root password on Linux
How to setup Debian ubuntu local ISO repository
In this tutorial we will setup a ubuntu local ISO repository. On a Linux system, it’s possible to specify a different source for software installation in the package manager. This means you don’t always have to download packages from official repositories.
WordPress Installation on Ubuntu Linux with Apache and MySQL
WordPress has remained one of the best and easiest ways to get a sleek site up and running ever since its inception in 2003. As a matter of fact, current trends only show its popularity continuing to increase. WordPress is simple to use, and even hosting it yourself isn’t that hard, as we’ll prove to you in this article.
In this guide, we’ll show you how to get your site hosted with WordPress on Ubuntu Linux. We’ll use Apache as our HTTP server, and also install PHP and MariaDB (an open source implementation of MySQL) since WordPress requires them in order to function. This assortment of packages is commonly referred to as a LAMP stack (Linux, Apache, MySQL, PHP). Once those packages are installed, we’ll go over the configuration of Apache and MySQL, including initial setup of a database and user, before installing WordPress itself. Towards the end, we’ll also show you how to configure a self signed SSL certificate, or get a free one from Let’s Encrypt, which enables your site to utilize HTTPS.
In this tutorial you will learn:
- How to install and configure Apache
- How to install and configure MariaDB for MySQL
- How to setup a MySQL user and database for WordPress
- How to download and install WordPress
- How to configure a self signed SSL certificate for your WordPress site
- How to configure a free SSL certificate from Let’s Encrypt
Apache .htaccess directory access protection
When running an Apache web server on a Linux system, there may be some directories that you don’t want everyone in the world to be able to access. Apache gives us a couple of different tools that website administrators can use to protect a directory.
One of the most common ways to configure restricted access to a folder is through the .htaccess file. Doing this configuration will prompt users for a password whenever they come across the protected URL. But we can also configure the same protection without .htaccess.
In this guide, we’ll go over the step by step instructions for protecting a directory on an Apache web server, through two different methods. Follow along with us to get the password protection set up on your own website.
In this tutorial you will learn:
- How to protect a directory using .htaccess file
- How to protect a directory without .htaccess file