If you have an outdated or unused account in your MySQL or MariaDB database, it's best to get rid of it. Having even one extra user is an additional vulnerability and attack surface in the database. In this guide, we'll show you the step by the step instructions to delete a specific user from a MySQL or MariaDB database from the command line on a Linux system.

DID YOU KNOW?
If you've forgotten the password to a user account and need to reset it, there's no need to delete it and start over. We have separate guides for changing a user password in MySQL and changing the root password in MySQL.
In this tutorial you will learn:
  • How to delete a user from MySQL/MariaDB database

LUKS is the acronym of Linux Unified Key Setup: it is the most used encryption implementation used on Linux systems and can be configured as an alternative to dm-crypt plain setup. Compared to the latter it provides some additional features like password hashing and salting and the ability to store multiple passwords in the so called LUKS header. In this tutorial I will assume the reader has a certain familiarity with LUKS; if you want to know more about this subject, you can check our basic guide about encrypting linux partitions with luks. The most common way to protect a LUKS device is to use a passphrase, however it is also possible to use a file as a key; in this tutorial we will see how to do this. Let’s go!

In this tutorial you will learn:

  • How to create a file with random data to use as a LUKS device key
  • How to add a key to a LUKS device
  • How to automatically decrypt a LUKS device at boot using a file as a key

npm is the package manager for Node.js and the JavaScript coding language. It can be installed on a Linux system and then used on the command line to download and install JavaScript packages and their requisite dependencies.

It's especially useful for developers working with Node.js, as npm's online registry contains a plethora of JavaScript packages that can be browsed and downloaded with ease. It's available for installation on any major Linux distro and operates in much the same way as a distro's package manager, which you're probably already familiar with.

In this guide, we'll show you how to install npm on various Linux distributions. We'll also show you basic usage commands for npm, such as installing and removing software packages.

In this tutorial you will learn:
  • How to install npm on major Linux distributions
  • Basic usage commands for npm

PXE (Preboot eXecution Environment) is a client-server environment which makes possible to boot and install operating systems without the need of physical media. The core idea is quite simple: in a very early stage, a client gets an IP address from a DHCP server and downloads the files needed to perform the boot process via the tftp protocol (Trivial ftp). In this tutorial we will use the dnsmasq application: it can be used as a primary DHCP server or in proxy DHCP mode if another DHCP server exists in the network; it also provides the tftp service used to transfer files.

In this tutorial you will learn:

  • How to configure pxelinux and create a boot menu
  • How to extract files from an ISO and setup the appropriate file structure
  • How to configure dnsmasq as a standard or proxy DHCP server
  • How to configure the tftp server embed in dnsmasq
  • How to allow traffic through the needed ports using ufw

pip is the package manager for the Python coding language. It can be installed on a Linux system and then used on the command line to download and install Python packages and their requisite dependencies.

This gives developers - as well as users who are just executing Python programs but not developing them - an easy way to download software packages written in Python. It's available for installation on any major Linux distro and operates in much the same way as a distro's package manager, which you're probably already familiar with.

In this guide, we'll show you how to install pip for Python 2 and Python 3 on various Linux distributions. We'll also show you basic usage commands for pip, such as installing and removing software packages.

In this tutorial you will learn:
  • How to install pip for Python 2 and Python 3 on major Linux distros
  • Basic usage commands for pip

There are many reasons why you may want to monitor the network activity on your Linux system. You may be troubleshooting a network issue, you may want to check to make sure that there are no malicious applications creating suspicious network activity, or you may simply want to know if any processes are phoning home. Whatever the reason, here are a few methods to see which processes on your system are engaged in network activity and who they are communicating with.

In this tutorial you will learn:

  • How to monitor network connections and listening services with netstat
  • How to monitor network connections and listening services with lsof
  • How to monitor network connections and listening services with ifconfig
  • What tools you can use to examine the data being sent over the network

If your website is hosted with NGINX and it has SSL enabled, it's best practice to disable HTTP completely and force all incoming traffic over to the HTTPS version of the website. This avoids having duplicate content and ensures that all of the site's users are only browsing the secure version of your website. You should also see an SEO boost, as search engines prefer non-redundant and secured web pages.

In this guide, we'll assume you're already using NGINX on a Linux system and want to redirect all HTTP traffic to HTTPS. Even if a user happens to follow an http:// link, the site should send them to the correct and secured page, which happens instantly and without the user's intervention.

There are two ways to setup this redirection in NGINX. One method allows you to configure the redirection for individual sites. The other method can redirect HTTP to HTTPS for all NGINX sites on your server, which is handy if you have multiple sites setup and want to avoid having to apply the exact same redirection to each one. We'll cover the step by step instructions for both methods below. Let's get started.

NOTE
Using Apache instead of NGINX? We've written a separate guide for how to use Apache to redirect all HTTP traffic to HTTPS.
In this tutorial you will learn:
  • How to redirect HTTP to HTTPS for individual NGINX websites
  • How to redirect HTTP to HTTPS for all NGINX websites

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

Notepad++ is a very popular text editor that's only built for Windows and doesn't have official support for Linux systems. However, it's now pretty easy to install Notepad++ on major Linux distros thanks to Snap packages.

Old methods for installing Notepad++ relied on using Wine for a compatibility layer and installing the program through Winetricks. That method still works, but the Snap package has Wine dependencies baked in, taking the fuss out of the whole process.

In this guide, we'll take you through the steps of installing Notepad++ on a Linux system by using Snap. Not all major distros have native access to Snaps just yet, so we will also be covering how to enable them on an assortment of popular distributions.

In this tutorial you will learn:
  • How to enable Snap support on major distros
  • How to install Notepad++ Snap package

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

How to save and quit using Vim text editor

Vim is a command line file editor for Linux systems. In this article, we'll show you one of the most basic functions you'll need to know for vi and vim, which is how to quit a file with or without saving changes to it.

In this tutorial you will learn:
  • How to save a file in vim
  • How to save and exit a file in vim
  • How to exit a file without saving in vim

If your website uses Apache and SSL, there's not much reason to keep using HTTP with your website. Having both HTTP and HTTPS just creates duplicate content, as now any given page will be accessible through two technically different URLs.

In this guide, we'll assume you're already using Apache on a Linux system and want to redirect all HTTP traffic to HTTPS. This will make sure that all your visitors are only connecting through HTTPS by forcing their browser over to the secure protocol if they happen to open an HTTP link. If a user decides to preface a link with http://, your site will be smart enough to still send them to the correct page, rather than showing duplicate content or displaying a 404 error.

There are two ways to set up this redirection in Apache. The better method is to configure Virtual Host, but users with hosted websites may not have access to this configuration. The second method is by making some changes to the .htaccess file. We'll cover the step by step instructions for both methods below. Let's get started.

In this tutorial you will learn:
  • How to redirect HTTP to HTTPS with Virtual Host
  • How to redirect HTTP to HTTPS with .htaccess file

MongoDB is popular database software capable of running on a variety of systems, including Linux. In this guide, we'll be taking you through the steps of installing MongoDB on Ubuntu Linux, as well as some basic configuration after it's up and running.

In this tutorial you will learn:
  • How to install MongoDB
  • How to control MongoDB (start, stop, etc)
  • How to connect to MongoDB remotely
  • How to change MongoDB default port

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

The ss command is the successor to the netstat command on Linux systems. The command is used by system administrators to see information about network connections. It allows you to check things like the status, origin, and destination of connections. In addition, ss displays route tables, interface statistics, masquerade connections, and multicast memberships.

In this guide, you'll learn how to use the ss command through examples and explanations. We'll show you its most common uses and everything you need to know in order to use it effectively.

In this tutorial you will learn:
  • How to use ss command

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: