What are the maximum number of usable partitions in a disk in Linux

Linux can generally have two types of Disks. IDE and SCSI.

IDE

By convention, IDE drives will be given device names /dev/hda to /dev/hdd. Hard Drive A (/dev/hda) is the first drive and Hard Drive C (/dev/hdc) is the third.

Udemy

Continue reading “What are the maximum number of usable partitions in a disk in Linux”

Solved: How to add swap space in Redhat or Ubuntu Linux

In this post  we will see how we can add a file as swap space in Linux. Same steps are to be followed for Redhat and Ubuntu Linux.

Type the following command to create 100MB swap file (1024 * 100MB = 102400 block size):

dd if=/dev/zero of=/swap1 bs=1024 count=102400

Secure swap file

Udemy

Continue reading “Solved: How to add swap space in Redhat or Ubuntu Linux”

How to add logical volume for swap in Redhat Linux

In our last post we have seen how to add a file for swap space.

In this post we will see how to add a LVM2 Logical Volume as swap.

Here we have a VG name VG1 in which we will create a volume LV1 of 1GB.

Udemy
# lvcreate VG1 -n LV1 -L 1G

Format the new swap space using mkswap:

Continue reading “How to add logical volume for swap in Redhat Linux”

Solved: How to change the keyboard layout for Redhat Linux

Nowadays we work as global teams and with people speaking different languages.

Some times you may face a situation where the Linux OS is installed with preference to another language e.g. French.  The layout of french keyboard is different from that of US keyboard. Thus if you type  “A” in US keyboard it will actually print “Q” . (Here you can get images of french keyboard)

This can be very frustrating since you are already accustomed with the US keyboard layout.

Udemy

Continue reading “Solved: How to change the keyboard layout for Redhat Linux”

Solved: How to change hostname in AWS EC2 instance of RHEL 7

In our last post we have seen how to change hostname of an RHEL server.

But if you are using the RHEL 7 AMI provided on AWS marketplace the steps will be slightly different.

Udemy

Continue reading “Solved: How to change hostname in AWS EC2 instance of RHEL 7”

Solved: How to change hostname in Redhat Linux

In this post we will see how to change hostname in Redhat Linux 4, 5, 6 and 7 .

For changing the hostname you should have root access. To switch to root do:-

sudo su -

If you want to change the hostname temporarily do as below:-

Udemy

Continue reading “Solved: How to change hostname in Redhat Linux”

Solved: Install ifconfig and ssh in Ubuntu

In this post we will see how to install ifconfig and ssh in Ubuntu 16.04 Xenial Xerus. You can install both or either of them independently .

ifconfig

By default you can check IP details in Ubuntu using

ip addr

But if you are more comfortable with “ifconfig”  then follow on.

Udemy

Ensure that your Ubuntu instance is connected to internet or to your local package repository server from which it can pull packages.

If you need ifconfig in your ubuntu server use following commands.

Continue reading “Solved: Install ifconfig and ssh in Ubuntu”