≡ Menu

Linux

15 Linux Bash History Expansion Examples You Should Know

Bash history is very powerful. Understanding how to effectively use the bash history expansions will make you extremely productive on the Linux command line. This article explains 15 examples that uses the following bash history expansion features: Event designators – Refers to a particular command in the history. It starts with a ! Word designators [...]

{ 20 comments }

20 Linux Log Files that are Located under /var/log Directory

If you spend lot of time in Linux environment, it is essential that you know where the log files are located, and what is contained in each and every log file. When your systems are running smoothly, take some time to learn and understand the content of various log files, which will help you when [...]

{ 21 comments }

Using Apache Virtual Host, you can run several websites on the same server. For example, I can run both thegeekstuff.com and top5freeware.com on a single physical server that has one Apache webserver running on it. There are two types of Apache virtual host configurations: 1) IP-Based Virtual Host and 2) Name-based Virtual Host. Name-based virtual [...]

{ 47 comments }

How to Install and Configure Nginx from Source on Linux

Before we understand what is nginx, we should know how to pronounce nginx. Its not N G I N X. nginx is pronounced as “Engine X”. nginx is short form after you remove both the e’s from “Engine X”. nginx is an open source web server that is similar to Apache, but very light weight. [...]

{ 8 comments }

How to Rotate Apache Log Files in Linux

Question: I would like to automatically rotate the apache access_log and error_log files. Can you explain with an example on how to do this? Answer: This can be achived using logrotate utility as explained below. Add the following file to /etc/logrotate.d directory. # vi /etc/logrotate.d/apache /usr/local/apache2/logs/access_log /usr/local/apache2/logs/error_log { size 100M compress dateext maxage 30 postrotate [...]

{ 10 comments }

Lazy sysadmin is the best sysadmin –Anonymous System administrators job is not visible to other IT groups or end-users. Mostly they look at administrators and wonder why sysadmins don’t seem to have any work. If you see a sysadmin who is always running around, and trying to put down fire, and constantly dealing with production [...]

{ 51 comments }

This article provides a total of 24 examples on iostat, vmstat, and mpstat commands. iostat reports CPU, disk I/O, and NFS statistics. vmstat reports virtual memory statistics. mpstat reports processors statictics. This article is part of our ongoing Linux performance monitoring series. Please note that iostat and vmstat are part of the sar utility. You [...]

{ 9 comments }

Question: When I perform rsync, it asks for my password on the remote server before starting the transfer. I would like to avoid this, and perform rsync without password. Can you explain with an example on how to setup rsync over ssh without password on Linux? Answer: The following steps explains how to setup rsync [...]

{ 16 comments }