When you execute the “useradd” command to add a new user on the server, in the background, there are several files updated and created. This post lists out the exact steps carried out in the background when you execute the below command. # useradd john 1. A new line for user john is created in […]
Archives for December 2017
What is the purpose of .bash_profile file under User Home Directory In Linux
What is the purpose of ~/.bash_profile file Apart from having a home directory to create and store files, users need an environment that gives them access to the tools and resources. When a user logs in to a system, the user’s work environment is determined by the initialization files. These initialization files are defined by […]
View files using – cat, more, tail, head and wc commands
There are several commands that display information about a file in the read-only format. The file-viewing commands include the following: cat more tail head wc cat Command The cat command displays the content of one or more text files on the screen without pausing. $ cat filename For Example: # cat data.txt northwest NW Joel […]
How to effectively use Man Pages under Linux
The online Reference Manual (man) pages provide detailed descriptions and usage of the commands. You can use the man command to display the man page entry that explains a given command. The syntax of the man command is as follows. $ man command $ man option command $ man option filename Displaying the Man Pages […]
How to Schedule Jobs with ‘at’ command under Linux
If you want to schedule a job to run one time only in the future (instead of scheduling it on a regular basis with cron) you can use the at command. To use at, you must first verify that the at package has been installed and that the atd service has been started. You define […]
Defining System Jobs Using Cron under Linux
The cron daemon can be configured to run scheduled system jobs. For system jobs, the user with whose permissions the command is run must also be specified. Enter the username between the time definition (the first five fields) and the command (which now becomes the seventh field). You define system jobs in the /etc/crontab file […]
How to schedule Jobs with Cron in Linux
You will find that there are many tasks that need to be carried out on a regular basis on your Linux system. For example, you may need to update a database or back up users’ data in the /home/ directory. While you could run these tasks manually, it would be more efficient (and more reliable) […]
Linux OS Service ‘syslog’
Syslog is the general standard for logging system and program messages in the Linux environment. This service constitutes the system log daemon, where any program can do its logging (debug, security, normal operation) through in addition the Linux kernel messages. In principle, the logs handled by syslog are available in the /var/log/ directory on Linux […]
Comparing NET-TOOLS V/s IPROUTE Package Commands (ip Vs ifconfig command comparison)
Below is a short comparison of the commands provided by the net-tools V/s iproute package. Basically we will be comparing the commands ifconfig V/s ip. NET-TOOLS COMMANDS IPROUTE COMMANDS arp -a ip neigh arp -v ip -s neigh arp -s 192.168.1.1 1:2:3:4:5:6 ip neigh add 192.168.1.1 lladdr 1:2:3:4:5:6 dev eth1 arp -i eth1 -d 192.168.1.1 […]
5 Useful Command Examples to Monitor User Activity under Linux
One of the most critical tasks you have as a system administrator is to monitor your system for any suspicious activity that might indicate a security compromise and act on it. You should evaluate login activity for signs of a security breach, such as multiple failed logins. NOTE: Reviewing files such as /var/log/messages can also […]