Q. I'd like to see all the partitions on my scsi hard drives. Under Windows Disk manager shows exactly how space is allocated on the disk drivers and free space etc. How do I display hard drive partitions information?
A. You can use any one of the following command:
[a] fdisk command : Partition table manipulator for Linux
[b] GNU Parted : a partition manipulation program
fdisk -l command
To 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 i.e. it will try to display all partitions, enter:
$ sudo fdisk -l
OR
# fdisk -l
Output
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000f1a3e Device Boot Start End Blocks Id System /dev/sda1 * 1 12749 102400000 7 HPFS/NTFS /dev/sda2 12750 24906 97651102+ 83 Linux /dev/sda3 24907 25149 1951897+ 82 Linux swap / Solaris /dev/sda4 25150 60802 286375936 f W95 Ext'd (LBA) /dev/sda5 25150 60802 286374912 7 HPFS/NTFS
GNU parted command
Pass print option to displays the partition table, enter:
$ sudo parted /dev/sda print
Output:
Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 105GB 105GB primary ntfs boot 2 105GB 205GB 100GB primary ext3 3 205GB 207GB 1999MB primary linux-swap 4 207GB 500GB 293GB extended lba 5 207GB 500GB 293GB logical ntfs Information: Don't forget to update /etc/fstab, if necessary.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 5 comments… read them below or add one }
Is there any day to day Linux Admin topic that you have left ;-)
I’ve been facing this problem for some time and I guess i might get some help over here.
When partition is made or altered by Linux or Windows, it can easily be read by Linux but not if the partition table is altered by Linux (i.e. by making changes in partitions by Linux), it becomes unreadable by Windows.
Take the case of installing Windows XP or something on a box containing RHEL. When one tries to boot that system with a Windows XP cd for installing it, the setup hangs after showing something like – “Windows is checking you system configuration”. This happens because XP is unable to read partition Table entries made by Linux.
Now wipe out the entire MBR along with the Partition Table, XP boots okay showing the entire hard disk space as Unallocated Space.
Now i want to know if there is any workaround available for this problem. i.e Installing Windows on a box having RHEL installed on it. I dont want to remove RHEL every time before installing Windows for making it dual bootable.
Hi,
I have installed Redhat-5 in my system….
But cdwriter not mount….
Means when i run “mount /media/cdrecorder”, it is showing path not found….
I can go up to “cd /media”, then when i give “ls” command nothing is showing
Please support
Suman
Please support
Hi Suman
You just insert the CD or DVD then login into the root and type these commands
mount /dev/dvd /media mount /dev/cd /mnt
cd /media cd /mnt
ls /media ls /mnt
you can follow any one column..
I have a harddisk I installed ubuntu linux in it the harddisk space it 20 gb i instlled it in 10 gb with swap space now i wnat to see the remeaning space how could i see use it
please help??