LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I install fdisk? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-install-fdisk-4175529376/)

drainingthoughts 12-27-2014 09:55 PM

How do I install fdisk?
 
i went to install fdiskfrom this site:

http://packages.ubuntu.com/lucid/amd...fdisk/download

and it said:

If you are running Ubuntu, it is strongly suggested to use a package manager like aptitude or synaptic to download and install packages, instead of doing so manually via this website.

does this apply for debian users?

it says the same thing when trying to dl a package manager.

how would one escape the recursive loop of needing a package manager to dl a package manager?

frankbell 12-27-2014 10:05 PM

Are you running Ubuntu or Debian? Your post does that make that clear.

Using a package manager is the preferred way of installing software with Linux. The software in a distro's repositories is curated and tested with the distro.

The Synaptic Package Manager is in Debian by default. In Ubuntu, the Ubuntu Software Center serves as a package manager, though you can install Synaptic if you wish (I would wish). This link from Ubuntu should also help.

You might also run

Code:

whereis fdisk
from a terminal. Odds are that Linux fdisk is already installed. It has been installed by default in every Linux distro I have ever used.

yancek 12-27-2014 10:06 PM

I can't imagine any Linux distribution which doesn't have fdisk in a default installation. You should certainly have it if you are using Ubuntu or Debian. Why do you think you need to download it?

Teufel 12-28-2014 04:44 AM

I think you have fdisk installed, but you can't access it because fdisk isn't a regular user's tool. If you will try to run it as regular user you will get a message: "Command not found".
You have to get root privileges or use sudo to run fdisk command, like the following:
Code:

su -
fdisk -l

or
Code:

sudo fdisk -l

Head_on_a_Stick 12-28-2014 07:54 AM

You should always use your package manager to install software.

In Debian, you should use synaptic if you are not comfortable with the command line.

If you're using GNOME you could have a look at software-center [sic] -- it's very nice & friendly.

You can install these from a terminal using:
Code:

# apt-get install synaptic software-center
If you're using Debian, do not use PPAs or .deb packages designed for Ubuntu -- they are fundamentally incompatible.

You probably shouldn't use fdisk at all -- it is a command-line partitioning tool and will quite happily wipe your entire hard drive with a few keystrokes.

Stick to gparted.

veerain 12-29-2014 10:56 PM

Normally util-linux has the fdisk program. Is Gnu-fdisk different one?

drainingthoughts 12-30-2014 04:22 AM

I'm running debian
 
i just installed fdisk in the software center

just found out i have synaptic

I dont know how to access fdisk

do not see it in system tools

have a strange feeling im missing something

my goal is to partition my hard drive and dual boot with windows and probably an easier version of linux

i was going to use fdisk

but like i said, i dont know how to access it

im open to recommendations of alternative partitioning software

Teufel 12-30-2014 04:48 AM

Quote:

but like i said, i dont know how to access it
Seems you didn't read answers posted above.
Your question already answered:
http://www.linuxquestions.org/questi...6/#post5291459
Open terminal and try it.

drainingthoughts 12-30-2014 05:35 AM

root@N8PC:/home/nate# fdisk -l

Disk /dev/sda: 1000 GB, 1000202273280 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1216 9767488 83 Linux
Warning: Partition 1 does not end on cylinder boundary.
/dev/sda2 1216 121602 967000545 5 Extended
Warning: Partition 2 does not end on cylinder boundary.
/dev/sda5 1216 3201 15944512 82 Linux swap
Warning: Partition 5 does not end on cylinder boundary.
/dev/sda6 3202 121602 951048000 83 Linux
Warning: Partition 6 does not end on cylinder boundary.
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Error: /dev/sr0: unrecognised disk label
root@N8PC:/home/nate# ^C
root@N8PC:/home/nate#



this is what happened

does this mean i can now use fdisk in the root terminal?

---------- Post added 12-30-14 at 02:36 AM ----------

root@N8PC:/home/nate# fdisk -l

Disk /dev/sda: 1000 GB, 1000202273280 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1216 9767488 83 Linux
Warning: Partition 1 does not end on cylinder boundary.
/dev/sda2 1216 121602 967000545 5 Extended
Warning: Partition 2 does not end on cylinder boundary.
/dev/sda5 1216 3201 15944512 82 Linux swap
Warning: Partition 5 does not end on cylinder boundary.
/dev/sda6 3202 121602 951048000 83 Linux
Warning: Partition 6 does not end on cylinder boundary.
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Error: /dev/sr0: unrecognised disk label
root@N8PC:/home/nate# ^C
root@N8PC:/home/nate#



this is what happened

does this mean i can now use fdisk in the root terminal?

Teufel 12-30-2014 05:47 AM

Quote:

Originally Posted by drainingthoughts (Post 5292466)
does this mean i can now use fdisk in the root terminal?

Yes, it is the only place where you can use it: in root terminal.
But you have to be carefull, fdisk command may destroy your partitions table and cause data lost.
"fdisk -l" is a mostly safe sample of fdisk usage. Just lists your disks and partitions.
Read this article first:
http://www.howtogeek.com/106873/how-...ions-on-linux/

drainingthoughts 12-30-2014 06:08 AM

Quote:

Originally Posted by Head_on_a_Stick (Post 5291498)

Stick to gparted.



I downloaded gparted from the software center

looked up how to access it

should i use sudo in terminal, or root terminal?

i looked online and it said to type

Code:

sudo parted
it asked for sudo password. it wouldnt allow me to type until i hit enter, then i started typing my password, and it told me the password "xxx", after typing only three letters of my password, is not the correct password

when i try in root terminal it says parted not found

drainingthoughts 12-30-2014 06:16 AM

well i feel really silly

just found gparted under administration

---------- Post added 12-30-14 at 03:16 AM ----------

well i feel really silly

just found gparted under administration

---------- Post added 12-30-14 at 03:17 AM ----------

why am i doubling my posts?

drainingthoughts 12-30-2014 06:17 AM

why am i doubling my posts

yancek 12-30-2014 09:18 AM

Before jumping in to using GParted, it would be a good idea to find out how it works. The link below is to an extremely detailed tutorial which should explain anything you need to know.

http://www.dedoimedo.com/computers/gparted.html


All times are GMT -5. The time now is 07:52 AM.