There are different options to create or manage partitions under Linux – Parted is one of them. This note describes its usage and the use case when creating a new partition table. Use parted interactively to enter commands one at a time. Include only the device as an argument to invoke interactive mode. Creating a […]
Archives for November 2017
Understanding linux parted utility
The GNU parted utility is also used to view the existing partition table, change the size of existing partitions, or add partitions from free space or additional hard drives. This utility is more advanced than the fdisk utility. It supports more disk label types and offers additional commands. parted syntax is: # parted [option] [device_name] […]
How to Create Disk Partitions using cfdisk
cfdisk is used to create, delete, and modify partitions on a disk device. Enter the cfdisk command and include the device that you want to partition as an argument. Example: # cfdisk /dev/sda Summary information for the disk device is displayed at the top of the window. The partition table is displayed in the middle […]
Understanding linux fdisk utility
viewing disk partitions The fdisk utility is a common partition table manipulator for Linux. Use fdisk –l to list the partition table. Output varies depending on the number of attached disks and partitions. To display the partition for a specific device, include the device name as an argument. For example: # fdisk -l /dev/sda Disk […]
How to view linux disk partitions (partition table)
Partitioning divides a disk drive into one or more logical disks. Each partition is treated as a separate disk with its own file system. Partition information is stored in a partition table. Primary vs Extended partitions The original partitioning scheme for PC hard disks allowed only four partitions, called primary partitions. To create more than […]
Understanding /etc/login.defs file
The /etc/login.defs file provides default configuration information for several user account parameters. The useradd, usermod, userdel, and groupadd commands, and other user and group utilities take default values from this file. Each line consists of a directive name and associated value. Below is sample /etc/logins.defs file from CentOS 7 system. # cat /etc/login.defs # # […]
Understanding /etc/group file
/etc/group Defines the default system group entries for system groups that support some system-wide tasks, such as printing, network administration, or electronic mail. Many of these groups have corresponding entries in the /etc/passwd file. Because most of the linux systems use a UPG scheme, a new entry is automatically created in /etc/group when a new […]
CentOS / RHEL : DNS servers in /etc/resolv.conf change after a reboot/network service restart. How to make them permanent
You would face this issue after a reboot or a network service restart. This usually happens as the scripts /etc/sysconfig/network-scripts/ifup-post and /etc/sysconfig/network-scripts/ifdown-post checks for the parameters “RESOLV_MODS=no” or “PEERDNS=no” in the network interface configuration file such as /etc/sysconfig/network-scripts/ifcfg-*. If these either of these parameters are not present, it will replace the contents of /etc/resolv.conf with […]
CentOS / RHEL : How to configure alias (virtual interface) of bond interface (bondx:y)
Configuring alias of a bonding interfaces is no different that configuring it for the normal interfaces like ethX. here is a short note on configuring alias of bonding interface. For the example setup, we have the bonding interface as bond0 as shown below : # ip address show bond0 14: bond0: [BROADCAST,MULTICAST,MASTER,UP,LOWER_UP] mtu 1500 qdisc […]