[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedSeptember 14, 2023

How to use cfdisk command in Linux.

How To Use Cfdisk Command.

cfdisk command is used to create, delete, and modify partitions on a disk device. It displays or manipulates the disk partition table by providing a text-based “graphical” interface.

cfdisk /dev/sda
  • See the available free space. Here we have 20 GB. Select NEW and create a new partition. Use up-down arrow keys to navigate and enter to select.

  • You can do many things with the free space, if you are installing a new system with a command line interface, you can see an option of using the selected space as primary partition. Example: Select the size 2GB. Enter -> and select primary. Similarly we can do a logical partition also.

  • After sizing the partition, select what type do you want, in my case, I am choosing Linux Swap.

  • After selecting the size and type write to the disk:

Options:

  • -h, –help: It displays help text and exit.

  • -L, –color[=when]: Colorize the output. The optional argument when can be auto, never or always. If the when argument is omitted, it defaults to auto. The colors can be disabled, for the current built-in default see –help output. See also the COLORS section.

  • -V, –version: Display version information and exit.

  • -z, –zero: Start with an in-memory zeroed partition table. This option does not zero the partition table on the disk; rather, it simply starts the program without reading the existing partition table. This option allows you to create a new partition table from scratch or from a sfdisk-compatible script.

Other command line commands: While using cfdisk you can use simple commands just like we use in vi editor for saving, inserting etc. The list of commands are as follows:

  • b: Toggle bootable flag of the current partition. It allows the user to select which partition is primary in the bootable drive. Just press b to see the results, no need of using ctrl.

  • d: It will delete the current marked partition, making a free space for new partition.

  • h: Will print the help screen, showing commands used .

  • n: Will create a new partition of the marked free space .

  • q: Will quit the program without writing partitions to the table.

  • s: Will fix the partitions order if they are now in proper array.

  • t: Will allow you to change the partition type, allowing you to select from the list.

  • u: Will dump the disk layout in a specified script file name

  • W: Will allow the user to write the data to the disk. The user will be asked if he or she wants to write or not by simply taking input “yes” or “no”.

  • x: Will allow the user to hide or display all extra information of the partition.

  • Up-Arrow: Will allow the user to move the cursor to the previous partition, like moving up in the given table list.

  • Down-Arrow: This option allows the user to move the cursor to the next partition, next partition because every new partition is placed after the previous partition.

  • Left-Arrow: This option allows the user to enter previous menu item.

  • Right-Arrow: This option allows the user to enter to the next menu item.

Example: Sample output when we use “?” or “h”

Keep reading
How to Install Python 3.9 on Debian 10
August 14, 2023

How to Install Python 3.9 on Debian 10

How To Install Python 3.9 On Debian 10 In this article, we’ll show you how to install Python 3.9 on Debian 10. Python 3.9 is the latest major release of the Python language. It includes many new features such as new dict operators, new str functions, support for IANA time zone, and more .…

Read article
How to Install and Configure an NFS Server on Ubuntu 20.04
August 14, 2023

How to Install and Configure an NFS Server on Ubuntu 20.04

How To Install And Configure An NFS Server On Ubuntu 20 This article explains how to set up an NFSv4 Server on Ubuntu 20.04. We’ll also show you how to mount an NFS file system on the client machine. By default, the NFS protocol is not encrypted and does not provide user authentication. Access to…

Read article
What is error 400?
August 14, 2023

What is error 400?

What is 400 error code? The HTTP 400 status code, also known as “400 Bad Request,” is a client-side error response code that indicates the server cannot process the request due to a problem with the request itself. “400 Bad Request” is a general error that indicates that your browser sends a…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00