[SOLVED] Viewing partition scheme via the command line.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been experimenting. I custom formatted one fedora box, and the other is auto formatted. Is there a way to see the partition scheme via command line? I'm curious to compare the two.
DESCRIPTION
fdisk (in the first form of invocation) is a menu-driven program for creation and manipulation of partition tables. It understands DOS-type
partition tables and BSD- or SUN-type disklabels.
fdisk does not understand GUID partition tables (GPTs) and it is not designed for large partitions. In these cases, use the more advanced GNU
parted(8).
fdisk does not use DOS-compatible mode and cylinders as display units by default. The old deprecated DOS behavior can be enabled with the
'-c=dos -u=cylinders' command-line options.
Hard disks can be divided into one or more logical disks called partitions. This division is recorded in the partition table, found in sector
0 of the disk. (In the BSD world one talks about `disk slices' and a `disklabel'.)
Linux needs at least one partition, namely for its root file system. It can use swap files and/or swap partitions, but the latter are more
efficient. So, usually one will want a second Linux partition dedicated as swap partition. On Intel-compatible hardware, the BIOS that boots
the system can often only access the first 1024 cylinders of the disk. For this reason people with large disks often create a third parti-
tion, just a few MB large, typically mounted on /boot, to store the kernel image and a few auxiliary files needed at boot time, so as to make
sure that this stuff is accessible to the BIOS. There may be reasons of security, ease of administration and backup, or testing, to use more
than the minimum number of partitions.
DEVICES
The device is usually /dev/sda, /dev/sdb or so. A device name refers to the entire disk. Old systems without libata (a library used inside
the Linux kernel to support ATA host controllers and devices) make a difference between IDE and SCSI disks. In such cases the device name
will be /dev/hd* (IDE) or /dev/sd* (SCSI).
The partition is a device name followed by a partition number. For example, /dev/sda1 is the first partition on the first hard disk in the
system. See also Linux kernel documentation (the Documentation/devices.txt file).
...
Options:
-l List the partition tables for the specified devices and then exit. If no devices are given, those mentioned in /proc/partitions (if
that exists) are used.
By using 'fdisk -l' you will get all devices available data. You can be specific for a particular device: 'fdisk -l /dev/sda' would provide partition information for the '/dev/sda' device.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.