We are prompted for a username and password when trying to access the protected directory

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

Read more

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

Read more

How to configure, mount, and access encrypted partition on Linux

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
How to configure, mount, and access encrypted partition on Linux

How to configure, mount, and access encrypted partition on Linux

Read more

Nvidia Linux Driver

Install the Latest Nvidia Linux Driver

Most of the modern Linux Desktop systems come with Nvidia driver pre-installed in a form of the Nouveau open-source graphics device driver for Nvidia video cards. Hence depending on your needs and in most of the situations there is no need for an additional Nvidia Linux Driver installation procedure.

The only reason could be that you wish to squeeze as much power as possible from the Nvidia VGA card and in that case you may attempt to install the official proprietary Nvidia Linux driver. Some Linux distributions offer the proprietary driver pre-packaged as part of its standard package repository making the entire Nvidia Linux Driver procedure extremely easy to follow.

As already mentioned the other alternative is to download and install the Nvidia Linux Driver directly from the Nvidia.com website. This procedure usually involves more hands on approach and it is rather intermediate Linux system administration job.

WARNING
Installation of the Nvidia Linux Driver from a 3rd party sources such as the proprietary Nvidia Linux driver from Nvidia.com or via PPA repository may result in an unstable system. From this reason if there is no real need for the Nvidia Linux Driver upgrade you are recommended to remain with the open source Nouveau driver.

Read more

Various Bash examples for redirecting standard output and standard error to the same file

Bash – Redirect both standard output and standard error to same file

The Bash shell is the most popular shell on Linux systems, and to use the shell efficiently, you need a little knowledge about Bash shell redirections. This is also an essential step in learning Bash scripting.

In this guide, we’ll show how to redirect standard output and standard error to the same file on the Bash shell command line. This will include several examples so you can pick the right method in any scenario.

In this tutorial you will learn:

  • How to redirect standard output and standard error to same file
  • How to redirect standard output and standard error to file and terminal
  • How to redirect standard output and standard error to /dev/null

Read more

Using Tor to browse anonymously on Linux

Protect Your Online Privacy With The Tor Browser Bundle

For anyone looking to protect their privacy online, Tor is an invaluable tool. It is both one of the most reliable ways to hide your identity and one of the easiest to use on Linux.

Tor works by routing your computer’s internet traffic through their own network. This way, you can still access online resources as usual, but your network traffic appears to originate from the Tor network, your IP address remains hidden, and your data is encrypted in the process. With Tor, you can also access .onion domain names, and access the infamous dark web.

In this guide, we’ll show you how to download, install, and configure Tor on a Linux system. This will get you up and running in a few steps so you can anonymize your traffic and access Tor-specific websites.

In this tutorial you will learn:

  • How to download and install Tor on Linux
  • How to configure Tor
  • How to keep Tor up to date
  • How to install new addons in Tor, and should I?

Read more

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

rpm-logo

How to create a custom rpm repository on Linux

Rpm is the acronym of RPM Package Manager: it is the low-level package manager in use in all the Red Hat family of distributions, such as Fedora and Red Hat Enterprise Linux.

An rpm package is a package containing software that is meant to be installed using this package management system, and rpm packages are usually distributed via software repositories. In this tutorial we learn how to create a custom rpm repository and how to configure our distribution to use it as a software source.

In this tutorial you will learn:

  • How to create an rpm repository
  • How to use the repository as a software source

Read more

gpg-logo

How to generate and backup a gpg keypair on Linux

Gnu Privacy Guard (gpg) is the Gnu project free and open source implementation of the OpenGPG standard. The gpg encryption system is called “asymmetric” and it is based on public key encryption: we encrypt a document with the public key of a recipient which will be the only one able to decrypt it, since it owns the private key associated with it. Gpg allows us also to sign documents using our private key and let others verify such signature with our public key. In this tutorial we will see how to generate and create a backup of a gpg keypair.

In this tutorial you will learn:

  • How to install gpg
  • How to generate a gpg keypair
  • How to list our keys
  • How to create a backup/export a gpg keypair and trustdb

Read more

gpg-logo

How to setup raid1 on Linux

RAID stands for Redundant Array of Inexpensive Disks; depending on the RAID level we setup, we can achieve data replication and/or data distribution. A RAID setup can be achieved via dedicated hardware or via software. In this tutorial we see how to implement a RAID1 (mirror) via software on Linux, using
the mdadm utility.

In this tutorial you will learn:

  • The peculiarities of the most used RAID levels
  • How to install mdadm on the major Linux distributions
  • How to configure a RAID1 with two disks
  • How to replace a disk in the RAID array

Read more

Renaming multiple files at once on Linux

How to rename multiple files on Linux

Renaming files on Linux systems is usually handled by the mv (move) command. The syntax is just mv old.txt new.txt. Simple enough, but what if we have multiple files that need to be renamed at once, even hundreds of them? The default mv utility can’t handle renaming more than one file unless we do a bit of scripting. There are also other utilities we can install to solve the problem, like rename and mmv.

In this guide, we’ll show you how to use the mv command as well as the rename and mmv tools to rename multiple files on your Linux distro. We’ll go over several examples so you can understand the syntax and how to use each method.

In this tutorial you will learn:

  • How to rename multiple files at once with mv command
  • How to install rename on major Linux distros
  • How to install mmv on major Linux distros
  • How to use mmv, through command examples
  • How to use rename, through command examples

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