LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   fdisk command - can't get it to work!! (https://www.linuxquestions.org/questions/linux-software-2/fdisk-command-cant-get-it-to-work-196674/)

sknarf 06-23-2004 01:30 AM

fdisk command - can't get it to work!!
 
From some reason i don't think i have fdisk on my version of Linux (Fedora 2). i have the manual, but when i try to run the program, it say "command not found". SO two questions:

1. Do i have it and don't know it?
2. Where can you download it, and does it come as a fiel that you put into your /bin directory?

Thanks

slakmagik 06-23-2004 01:34 AM

It should be in /sbin. You need to be root to do anything useful with it. ;)

sknarf 06-23-2004 01:42 AM

Awesome,. now i checked my $PATH constant, and it does NOT include /sbin, this is probaly why i get the error ("bash: fdisk: command not found"). Questions:

1: is there i link in the /bin directory that links to fdisk?
2: How to i include ?sbin in my $PATH constant?

Thanks a lot!

slakmagik 06-23-2004 01:56 AM

Yep, that's why - if it's not on your path, it doesn't exist as a command for you.

No link - you can make one with the 'ln' command and the '-s' option, but it wouldn't do any good by itself.

As far as the path, it depends on the shell but for bash, you just 'export PATH=$PATH:/path/you/want' and/or add it to your bash config file.

However, fdisk either explicitly checks the UID of the invoking user or at least knows the perms of the underlying devices so, as I say, you can't do anything useful with fdisk as normal user. Just 'su' and invoke it.

jacky 06-23-2004 01:59 AM

hi
normal users path dosen't include /sbin directory .
Only root users path contains /sbin directory
and only root user has the permission to exicute the fdisk command
evnthough u add the /sbin directory to your path most of the commands
wont work due to permission.
for adding path open .bash_profile in ur home directory and add the /sbin to path varible


All times are GMT -5. The time now is 06:57 PM.