All software on a Linux system is divided into packages that can be installed, uninstalled, upgraded, queried, and verified. CentOS/RHEL uses the Red Hat Package Manager (RPM) to facilitate the installation, upgrade and removal of software packages. The rpm utility provides many useful options for querying and verifying packages, as well as installing, upgrading, and […]
Archives for November 2017
CentOS / RHEL : How to extend Physical Volume in LVM by extending the Disk Partition used
The post discusses on how to expand the space available in an LVM volume by extending the physical disk partition using fdisk. This example shows how to resize the physical volume /dev/sdc1 from 200MB to 400MB. Potential Data Loss Warning: This step will delete the existing partition structure and create a new partition in its […]
How to use “yum downloadonly” to download a package without installing it
Ther are multiple ways in which you can download a yum package without installing it. The 2 most commonly used methods are described here in the post. 1. using the “downloadonly” plugin for yum 2. using “yumdownloader” utility. Method 1 : using the “downloadonly” plugin for yum 1. Install the package including “downloadonly” plugin: # […]
How to find which rpm package provides a specific file or library in RHEL / CentOS
‘The Ask’ here is to find the rpm package from which provides a specific binary like /bin/lvcreate or a library file. There 2 commands which can help you find the rpm package from the file – rpm and yum. You can also find all the files included in a package with the rpm command. Find […]
Understanding /proc/meminfo file (Analyzing Memory utilization in Linux)
– The /proc filesystem is pseudo filesystem. It does not exist on a disk. Instead, the kernel creates it in memory. It is used to provide information about the system (originally about processes, hence the name). – The ‘/proc/meminfo‘ is used by to report the amount of free and used memory (both physical and swap) […]
Bash for loop Examples
There are many times in a shell script when you want to repeatedly execute a statement or group of statements until some specified condition occurs. In addition, you might want to execute a group of statements for each element in a certain list. The shell provides three looping constructs for these situations: the for, while, […]
Understanding the Network interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth#
The system reads the network interface files during the boot process to determine which interfaces to bring up and how to configure them. The file name format of the network interface configuration file is /etc/sysconfig/network-scripts/ifcfg-eth#. So if you want to configure the interface eth0, the file to be edited is /etc/sysconfig/network-scripts/ifcfg-eth0. Below is a sample […]
The locate Command in Linux
locate command locate is considered low-impacting in terms of system resource consumption, because it does not search the file system in real time. Instead, locate searches through a database which is updated at idle hours (usually at night). This approach provides very fast searching, but results may not reflect recently added or deleted files. The […]
CentOS / RHEL : How to adjust the telnet timeout (and how to disable it)
The problem 1. How to modify the telnet timeout period? 2. Telnet connection is disconnected after some idle time. How to disable the timeout in telnet? The Solution Using the tcp_keepalive_time parameter To modify the telnet timeout you need to change the value of the parameter tcp_keepalive_time. Below is the details of the parameter from […]
Understanding Basic File Permissions and ownership in Linux
All files and directories in Linux have a standard set of access permissions. These access permissions control who can access what files, and provides a fundamental level of security to the files and directories in a system. Viewing Permissions To view the permissions for files and directories, use the ls -l or ls –n commands. […]