‘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 […]
Archives for November 2017
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 […]
ip Command Examples to Manage Networking in Linux
You can use the ip command to display the status of an interface, configure network properties, or for debugging or tuning the network. The ip command replaces the ifconfig command, which is deprecated. The syntax of the ip utility follows: # ip [OPTIONS] OBJECT {COMMAND | help} ip command provides a number of OBJECT arguments, […]
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. […]
Beginners Guide to yum Configuration
All software on a Linux system is divided into packages that can be installed, uninstalled, upgraded, queried, and verified. CentOS/RHEL systems use the Red Hat Package Manager (RPM) to facilitate the installation, upgrade and removal of software packages. CentOS/RHEL also provides the yum(Yellowdog Updater, Modified) utility, which works with RPM packages. When yum installs or […]
How to update/add a file in the Docker Image
The post discusses how to alter a standard docker image pulled from a Public repository in Docker hub as per your need. For the example of this post, we will pull a latest CentOS docker image and add a test directory “test_dir” and create a test file “test_fiel” into it. Adding a directory and image […]