Linux tutorials

Linux Bash Shell Useful Commands

Create a new tar archive. $ tar cvf archive_name.tar dirname/ Extract from an existing tar archive. $ tar xvf archive_name.tar View an existing tar archive. $ tar tvf archive_name.tar Check if remote port is open with bash: echo >/dev/tcp/8.8.8.8/53 && echo "open" Suspend process: Ctrl + z Move process to …

Read More »

Basic CLI Tips and Tricks II

This article is a continuation of our previous article – 40 Basic Command Line Tips and Tricks. The terminal is a really powerful tool when it comes to Linux, anything and almost everything on Linux can be done via the command line. Therefore it is necessary for us to have a basic …

Read More »

40 Basic Linux CLI Tips and Tricks

1.  Everything in Linux is a file including the hardware and even the directories. 2. # : Denotes the super(root) user 3.  $ : Denotes the normal user 4.  /root: Denotes the super user’s directory /home: Denotes the normal user’s directory. 5.  Switching between Terminals §  Ctrl + Alt + F1-F6: Console login §  Ctrl + Alt + …

Read More »

Permanent redirect (301) with .htaccess

To set a permanent redirection from with example.com and www.example.com to example1.com, the following code shall help you RewriteEngine on RewriteCond %{HTTP_HOST} ^example\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.example\.com$ RewriteRule ^(.*)$ “http\:\/\/example1\.com\/$1″ [R=301,L] Just put the above code in the .htaccess file  under example.com by replacing the domains as per your need …

Read More »

Seven “must read” Linux tutorials

If you’re going to have long relations with Linux Operating System and use it as efficiently as possible I suggest to read the following howtos and guides that will help you on the way to advanced Linux user status .. 🙂 Advanced Bash-Scripting Guide by Mendel Cooper This document is both a tutorial …

Read More »

How To Lock/Unlock User Accounts From The Terminal Under Ubuntu/Linux Mint

In this post, we will see how to lock or unlock a specific user account from the terminal using two methods. Method 1 (Recommended)To lock a user account, open the terminal and run this command: sudo usermod –expiredate 1 username Replace username with the user account name you want to disable. The user …

Read More »

How To Add/Remove Users Accounts From The Terminal On Ubuntu 12.10/12.04/Linux Mint 13

In this tutorial, we will see how to create/remove user accounts using the terminal under Ubuntu/Linux Mint. I will also show you how to add a specific user to the “sudo” group so that you allow it to run sudo commands, but be careful in using this because granting a …

Read More »