How to create one new partition in my hard disk in Linux

0 votes

Hi Guys,

I want to create one new partition in my disk for my project. But I am not able to do so.

How can I do that?

Thank You

Apr 7, 2020 in Linux Administration by akhtar
• 38,230 points
957 views

1 answer to this question.

0 votes

Hi@akhtar,

To create new partition you can follow the below given steps one by one.

  • Enter the particular hard disk name.
$ fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x3f5179f6.
Command (m for help):
  • Enter n to create new partion.

  • Enter p to create primary partition.

  • Give size of the partition.

  • Save it with w.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): +1G
Partition 1 of type Linux and of size 1 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
  • Update your partition table with the below command.

$ udevadm settle

Hope this will help.
Thank You

answered Apr 7, 2020 by MD
• 95,440 points

Related Questions In Linux Administration

0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Feb 1, 2019 in Linux Administration by Omkar
• 69,210 points
826 views
0 votes
1 answer

How to create Volume Group in Linux?

Hi@akhtar, To create a Volume Group, you need ...READ MORE

answered Jul 9, 2020 in Linux Administration by MD
• 95,440 points
1,055 views
0 votes
1 answer

How to create Logical Volume from Volume Group in Linux?

Hi@akhtar, You can use lvcreate command to create ...READ MORE

answered Jul 9, 2020 in Linux Administration by MD
• 95,440 points
1,074 views
0 votes
1 answer

How to create a group in Linux system?

Hi@MD, On Linux, group information is held in the /etc/group file. ...READ MORE

answered Aug 14, 2020 in Linux Administration by akhtar
• 38,230 points
577 views
0 votes
1 answer
0 votes
1 answer

What is the difference between ctrl z and ctrl c in command line?

Hi@akhtar, Generally, these two commands are used to ...READ MORE

answered Feb 24, 2020 in Linux Administration by MD
• 95,440 points
44,960 views
0 votes
1 answer

not able to run netstat-tnlp in Linux.

Hi@akhtar, In Linux system netstat-tnlp command comes from ...READ MORE

answered Apr 16, 2020 in Linux Administration by MD
• 95,440 points
768 views
0 votes
1 answer

How to break root password in CentOS/RHEL 8?

Hi@akhtar, Reboot the system and interrupt the boot ...READ MORE

answered May 11, 2020 in Linux Administration by MD
• 95,440 points
1,437 views
0 votes
1 answer

How to create one crontab job in Linux?

Hi@akhtar, To configure crontab in your system, you ...READ MORE

answered May 13, 2020 in Linux Administration by MD
• 95,440 points
612 views
0 votes
1 answer

How to create Physical Volume in Linux?

Hi@akhtar, To create Physical volume in the Linux ...READ MORE

answered Jul 9, 2020 in Linux Administration by MD
• 95,440 points
4,549 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP