• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Archives for May 2017

How to disable NetworkManager on CentOS / RHEL 7

by admin

Disabling NetworkManager The following steps will disable NetworkManager service and allows the interface to be managed only by network service. 1. To check which are the interfaces managed by NetworkManager # nmcli device status This displays a table that lists all network interfaces along with their STATE. If Network Manager is not controlling an interface, […]

Filed Under: CentOS/RHEL 7, Linux

CentOS / RHEL : Managing password ageing for users using chage (with practical Examples)

by admin

For security reasons, it is good practice to require users to change their passwords periodically. To configure password expiration for a user from a shell prompt, use the chage command. The basic syntax of the chage command is : # chage [option] [username] The table below lists out the command line options that can be […]

Filed Under: Linux

CentOS / RHEL : How to configure a user account to never expire (disable password ageing)

by admin

Question : How to configure a user account so that the password will never expire? Answer: By default passwords do not expire on user accounts. If an expiration date has been added to an account and you wish to remove it use either the passwd or chage commands to change the maximum number of days […]

Filed Under: Linux

CentOS / RHEL 5,6 : How to Change the timezone

by admin

Timezone configuration on Linux is usually set up at installation time. On RHEL 5 and 6, the procedure to change the Timezone configuration is as follows. The example used here is from timezone MDT to IST. The timezone can be either changed from command line or using the system-config-date command. Using system-config-date command Use the […]

Filed Under: Linux

How to find the inode size of an ext2/ext3/ext4 filesystem?

by admin

By using the tune2fs tool with the option, -l, the inode size of the filesystem could be seen. Using the same option, other information of the filesystem superblock can also be seen. The superblock contains information about the filesystem, such as the number of free blocks available, and the number of mounts, that may be […]

Filed Under: Linux

DHCP configuration file /etc/dhcp/dhcpd.conf explained

by admin

The main DHCP configuration file is /etc/dhcp/dhcpd.conf. The file is used to store the network configuration information required by DHCP clients. There is also a sample configuration file at /usr/share/doc/dhcp-[version]/dhcpd.conf.sample. # cat /usr/share/doc/dhcp*/dhcpd.conf.sample # dhcpd.conf # # Sample configuration file for ISC dhcpd # # option definitions common to all supported networks… option domain-name “example.org”; […]

Filed Under: Linux

CentOS / RHEL : How to configure an DHCP server

by admin

1. Install the dhcp package: # yum install dhcp 2. Copy the sample file /usr/share/doc/dhcp*/dhcpd.conf.sample. # cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcp/dhcpd.conf 3. The Sample dhcp configuration file will look as follows. # cat /etc/dhcp/dhcpd.conf Allow booting; Allow bootp; authoritative; subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.1; range 192.168.0.100 192.168.0.200; default-lease-time 21600; max-lease-time 43200; You will need […]

Filed Under: Linux

CentOS / RHEL : How to change SNMP community string

by admin

Question: How to change an SNMP community string in CentOS / RHEL? Answer: Here is a short note on how to change an SNMP community string and test if its working allright. 1. The below line in /etc/snmp/snmpd.conf needs to be modified to change the community string. Replace the string public or the last word […]

Filed Under: Linux

CentOS / RHEL : How to create new LVM based swap partition

by admin

Let see an example of increasing existing swap space by adding new LVM based swap. The example here uses the disk /dev/sdc for creating a new volume group and swap volume under it. Since we are going to use this disk, any data, if exists on it, will be lost. As root user perform the […]

Filed Under: Linux

CentOS / RHEL : How to add swap file

by admin

Not the best practices to add a file as swap space, but it comes handy when you have an urgent requirement of adding swap space. The post below describes steps to add swap file. Adding swap file Determine the size of the new swap file in MB and multiple by 1024 to determine the block […]

Filed Under: Linux

« Previous Page
Next Page »

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright