Display Date And Time In Linux

To display the current date and time in Linux, you can use the date command. To display the date and time in the format Weekday Month Day HH:MM:SS Timezone Year, you can use the following command: date This will output the date and time in the format described above, for example: Fri Feb 19 15:45:30 … Read more

Linux Change Hostname

To change the hostname of a Linux system, you can follow these steps: Log in to the system with root or sudo access. Open the /etc/hostname file with a text editor such as nano or vi. sudo nano /etc/hostname In the file, replace the current hostname with the new hostname that you want to set. … Read more

How to use yum command In RHEL 5/6/7/8/9

Yum is a package manager that is used in RHEL (Red Hat Enterprise Linux) systems to install, update, and remove software packages. Here are some common uses of the yum command in RHEL 5/6/7/8/9: Update all packages: yum update This command will download and install all updates for all packages on the system. Install a … Read more

Update Centos Linux

To update CentOS Linux, follow these steps: Open a terminal window on your CentOS system. Update the package lists by running the command: sudo yum update This command will download and install the latest package information for your system. Once the package lists are updated, you can update your system by running the command: sudo … Read more

Red Hat / CentOS Check and List Running Services Linux Command

On Red Hat / CentOS, the systemctl command can be used to check and list running services. Here are some examples: To list all running services, use the command: systemctl list-units –type=service –state=running To check the status of a particular service, use the command: systemctl status servicename Replace servicename with the name of the service … Read more

Red Hat / CentOS: Swap / Change Ethernet Aliases

In Red Hat and CentOS, Ethernet aliases are usually configured using the ifcfg-ethX:Y format, where X is the number of the physical Ethernet interface and Y is the alias number. Here’s how you can swap or change Ethernet aliases: Edit the appropriate interface configuration file The interface configuration files are located in the /etc/sysconfig/network-scripts directory. … Read more