If you check the output of the swapon -s command, you would see the Priority column. The priority column defines the order in which the swap devices are used when required. In our example below the priority -1 is higher than the priority -2 (as the values are in negative). # swapon -s Filename Type […]
Archives for August 2017
CentOS / RHEL 7 : How to create custom script to run automatically during boot
In RHEL 5 and 6, we were using automatic startup feature of RHEL through /etc/rc.d/init.d to run any script at system boot. Starting with RHEL 7 init is replaced by systemd and the prior method is now deprecated. There is another way in RHEL 7 to do the same. Creating the custom script 1. Let […]
CentOS / RHEL 7 : How to Modify GRUB2 Arguments with grubby
Starting RHEL 7, GRUB2 is the default boot loader. The configurations and settings of GRUB2 are very different than the GRUB used in RHEL 6 and prior versions. The grubby command-line utility can be used to make persistent changes to the /boot/grub.cfg file. You can also modify /etc/default/grub file and use grub2-mkconfig to modify the […]
How to use the “screen” command in Linux
screen command The screen command launches a terminal in the background which can be detached from and then reconnected to. This is especially useful when you log in to the system remotely. You can start a screen, kick off a command, detach from the screen, and log out. You can then log in later and […]
How to set inactivity timeouts for logins and shells in Solaris
Types of inactivity timeouts in Solaris There are 2 types of inactivity timeouts in Solaris. login session inactivity: This is before you log in and you are at the Login: prompt. shell session inactivity: This is after you login and the session is left unattended. This applies to only bash and ksh shells. How to […]
CentOS / RHEL : How to Recover from deleted /etc/passwd file
So, on one fine day you found that the /etc/passwd file is missing from your linux system. You are not able to login into the system because of this and Upon rebooting into single-mode mode the /etc/passwd file was found to be empty – no account information available. Do not worry, its not the end […]
CentOS / RHEL 7 : How to disable IPv6 on a specific interface only
We have already seen how to disable ipv6 globally on CentOS / RHEL 7. There could be an ask to disable ipv6 just for a particular interface on the system and not for all the available interfaces or system wide. The posts describe steps to disable ipv6 on a particular interface in CentOS / RHEL […]
CentOS / RHEL 7 : How to follow the mount order in /etc/fstab
What has changed with respect to mount order in RHEL 7 With the introduction of systemd in RHEL 7 the boot process has become a lot faster because many services and processes are now started in parallel. One of those consequences is the lack of consistent order in which filesystems are mounted. Their order for […]
Linux OS Service ‘anacron’
Service Name anacron Cron Vs Anacron Similar to the cron service, the anacron service runs applications or scripts at specific times and dates. This allows for reliable unattended system operation – scheduled events are not missed if the system goes down – instead, they are run as soon as possible after their scheduled time. Candidates […]
CentOS / RHEL : How to restore/recover a deleted volume group in LVM
Question : how to recover/restore a volume group if a system admin deleted it accidently Solution LVM takes a backup of the on-disk metadata before and after running any LVM operation on a PV/VG/LV. For example, if you create a new LV the backup of all the metadata for the VG before and after creating […]