Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Join a Windows XP Computer to a Windows 7/8/10 Homegroup Windows XP Tips
  • How to blur a face in a photo with Canva Computer Tips
  • Search Outlook Email by Sender, Date, Keyword, Size and More MS Office Tips
  • How To Change the Alarm Sound On Your iPhone 11 iPhone
  • Android Pie (version 9) Review – The “Techie” Smartphone OS Gets Smarter and Friendlier Smartphones
  • The 7 Best PDF Readers for Windows In 2020 How-To
  • Show and Hide Desktop Icons in GNOME Linux Linux Tips
  • Best ti 86 graphing calculator 2020

    Best ti 86 graphing calculator 2020. 1 - Texas Instruments TI-86 ViewScreen Calculator Top Reviews This works great so

How to Create a Linux Disk Partition

Posted on October 7, 2020 By blog_786 No Comments on How to Create a Linux Disk Partition

To use storage devices such as USB sticks and hard drives in Linux, you also need to understand how to structure them when using the Linux operating system. Storage devices are often divided into discrete parts called partitions. This allows you to create a file system by dividing your hard drive into multiple virtual parts.

A Linux disk partition is like an edge device that tells each filesystem how much space it can use. This is useful when creating shared drives and allows you to more efficiently allocate and edit disk space.

How to Create a Linux Disk Partition

For example, if you have a 2GB USB drive, you can create a partition that takes up the entire drive, two partitions of 1GB each, or different sizes. Each Linux disk partition acts like a separate hard drive. This is especially useful if you are using multiple operating systems on the same computer.

Use the Partition Command

Ubuntu comes with parted preinstalled. If you are using a different distribution, install it using the following command:

apt-get-install parted

To see the hard drives on your system, enter: sudo parted -l. See the list of devices in the screenshot below:

– /

How to Create a Linux Disk Partition

You can see above that there are three Ubuntu partitions on Disk / dev / sda. Let’s use a partition named / dev / sda5 to create a new partition.

The next step is to run parted. But make sure you are using root privileges. Select the drive you want to partition. We will be using / dev / vdc.

Enter the following command:

(parted) select / dev / vdc

To see what is on the Linux disk partition, type: print. You will see a summary of your hard drive, size, and partition table.

The example below uses Model: Virtio Block Device hard drive, size is 1396 MB, partition table is gpt.

How to Create a Linux Disk Partition

How to Create a Linux Disk Partition

To set up your Ubuntu partition disk, you must first exit by typing quit. The next step is to open the selected storage device with parted. In this tutorial, we will be using the / dev / vdc device.

If you do not specify a specific device that you want to use, your system will randomly select the device. Use the command below which includes the device name (vdc):

sudo parted / dev / vdc

How to Create a Linux Disk Partition

To install the partition table, enter GPT, then Yes to accept. You should only do this with sections that do not contain the data you want to keep.

How to Create a Linux Disk Partition

View the partition table to display information about the storage device with the following command:

(separate) print

To see instructions for creating a new partition, type (parted) help mkpart.

How to Create a Linux Disk Partition

In this tutorial, we will create a new Linux disk partition using the following command:

(parted) mkpart primary 0 1396 MB

0 means you want to create a partition at the beginning of the disk. From the screenshot above, we know that there is 1396 MB of disk space. The above command tells your system to start the partition at 0 and end it at 1396 MB.

To be able to use a section, it must be formatted. First, you need to exit parted by typing quit. Then, using the ext4 filesystem, enter the following command to format the disk:

mkfs.ext4 / dev / vdc

Confirm by typing sudo parted / dev / vdc. To exit parted, enter quit. When you exit parted, your changes are saved automatically.

In command mode, use the one letter command to show you a list of actions you can take. Type m and press Enter.

How to Create a Linux Disk Partition

Create disk partitions using cfdisk

Cfdisk is a Linux utility used to create, delete, and modify partitions on a disk device. To use it to create a section, enter the following command:

# cfdisk / dev / sda

The drive name in this example is sda.

How to Create a Linux Disk Partition

In the screenshot above, you can see the summary of the disk device. The partition table is shown in the middle of the window. The brackets at the bottom show the commands to be selected.

Use the up and down arrow keys to select a section from the list. Select a command using the right and left arrows.

The example above shows three main sections (1, 2 and 3). Pay attention to the type of partition with free space.

Create a new section by choosing New in the bottom window. We’ll call this partition / dev / sdb. Enter the command # cfdisk / dev / sdb. Then select primary as the partition type on the next screen.

On the next screen, you will specify the size of the partition. We will create an 800KB partition. You will now be prompted to determine where to start the section. Select the beginning of the free space.

On the next screen, select “Burn” to save your changes and write the partition data to disk. Test the new section by printing it out using the following command:

fdisk -l / dev / sdb

How to Create a Linux Disk Partition

Final tips for creating Linux disk partitions

You should always back up your data. Even the smallest mistake can destroy a partition on a critical disk.

Also, be sure to check and double-check that you are using the correct drive when creating the partition. Otherwise, you may lose data.

Let us know your questions in the comments below.

–

Share this:

  • Twitter
  • Facebook
Linux Tips

Post navigation

Previous Post: 6 Best Online Accounting Software for 2020
Next Post: How To Navigate & Use the Linux Directory Structure

Related Posts

  • Why the “less” Command is Better Than “more” in UNIX and Linux Linux Tips
  • How To Upgrade To The Latest Ubuntu Linux Tips
  • Show and Hide Desktop Icons in GNOME Linux Linux Tips
  • TOP 5 Linux Distros for Gaming Linux Tips
  • Make a Custom Live Linux Distro with Linux Live Kit Linux Tips
  • HDG Explains : What Is UNIX? Linux Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  • SmartDNS vs VPN – What’s the Difference?
  • How to go Back to the old YouTube Layout (2017)
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • What Is “Other” Storage on Android And How to Clean It Up ?
DMCA.com Protection Status

Recent Posts

  • How to Bypass Chromecast DNS and Circumvent Geo Blocking
  • 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  • SmartDNS vs VPN “What’s the Difference?”
  • How to go Back to the old YouTube Layout (2013)
  • A Simple Trick to Get 50% Discount on Audible for Three Months

Recent Comments

  1. A Simple Trick to Get 50% Discount on Audible for Three Months on Private Browsing: What is it and What it is not
  2. 6 Best PayPal Alternatives (2017) on How to Save Money While Shopping Online in India
  3. Automatically Transcribe YouTube Video/Audio with Google Docs on 5 Best Team Management Apps (For Small and Large Teams)
  4. 6 Things You Need Know About Email Encryption on Delete All Emails from Gmail With Once Click
  5. Looking For YouTube Alternative? Try These 7 Video Sharing Sites on Ten Best YouTube Video Editing Software 2023
  • How to Customize the Command Prompt in Windows 10 Windows 10
  • Announcing the Online Tech Tips YouTube Channel

    Online Tech Tips has been around since 2007, offering readers daily computer tips to make life a little easier. We hope that you have enjoyed readin

  • Best pipe trades pro calculator 2020

    Best pipe trades pro calculator 2020. 1 - YESWELDER HI-LO Stainless Steel Welding Gauge Inch&Metric for Measurement of Pipe After Fit-up/Alignment F

  • How to Disable Annoying Default Alerts on Apple Watch Hardware
  • Best weight watchers points calculator 2018

    Best weight watchers points calculator 2018 2020. 1 - LiCB CR2032 3V Lithium Battery(10-Pack) Top Reviews I was skeptic

  • What Political Ideology Are You? 7 Websites to Test Yourself How-To
  • vat calculator South Korea

    The vat calculator South Korea. vat calculator South Korea VAT is a national Tax that is collected in South Korea on the supply of goods and se

  • How To Make YouTube Channel Art Web Site Tips

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version