The shutdown command is the preferred method of rebooting or shutting down Linux. Using shutdown you can schedule a reboot or shutdown at some time in the future, and shutdown will automatically notify all logged-in users of the impending action. As the time approaches, it will alert logged-in users with a greater frequency and urgency. […]
Archives for April 2018
Understanding the rc Scripts in Linux
The rc script When init enters a runlevel, it calls the rc script with a numeric argument specifying the runlevel to go to. rc then starts and stops services on the system as necessary to bring the system to that runlevel. Though typically called at boot, the rc script can be called by init to […]
How to use strace and ltrace commands in Linux
The strace Command The strace command can be used to intercept and record the system calls made, and the signals received by a process. This allows examination of the boundary layer between the user and kernel space which can be very useful for identifying why a process is failing. Using strace to analyze how a […]
Linux OS Service ‘sshd’
The sshd (Secure Shell Daemon) service is part of the OpenSSH implementation for Linux that provides authenticated, end-to-end encrypted networked communication. For example, a user on one host can log in to another system without using a password because the sshd service can be configured to use alternate authentication techniques such as exchanging shared-key information. […]
How to Run DNS and FTP services in a chroot Jail
As the name implies, a chroot operation changes the apparent root directory for a running process and its children. It allows you to run a program (process) with a root directory other than /. The program cannot see or access files outside the designated directory tree. For example, you can run a program and specify […]
How to use the ssh-keygen Command in Linux
Use the ssh-keygen command to generate a public/private authentication key pair. Authentication keys allow a user to connect to a remote system without supplying a password. Keys must be generated for each user separately. If you generate key pairs as the root user, only the root can use the keys. The following example creates the […]
How to avoid ssh from prompting key passphrase for passwordless logins
The ssh-agent program is an authentication agent that handles passwords for SSH private keys. Use ssh-add to add the keys to the list maintained by ssh-agent. After you add a private key password to ssh-agent, you do not need to enter it each time you connect to a remote host with your public key. Generating […]
How to verify the integrity of a file with md5 checksum
Checksum programs are used to generate checksum key strings from the files and verify the integrity of the files later by using that checksum string. A file might be distributed over the network or any storage media to different destinations. Due to many reasons, there are chances of the file being corrupted due to a […]
How to check the PHP version on Linux
There are several possibilities to check and validate PHP version on Linux. 1. Open a bash shell terminal and use the command “php –version” or “php -v” to get the version of PHP installed on the system. # php –version PHP 5.4.16 (cli) (built: Mar 7 2018 13:34:47) Copyright (c) 1997-2013 The PHP Group Zend […]
Linux OS Service ‘nscd’
This is the Name Service Cache Daemon. It takes care of group and password lookups for running programs and then caches the lookup results for the next query for services that can experience slowness in picking up changes such as NIS or LDAP. If you’re running these services, you may want to run nscd. This […]