LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-23-2004, 01:30 AM   #1
sknarf
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Rep: Reputation: 0
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
 
Old 06-23-2004, 01:34 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
It should be in /sbin. You need to be root to do anything useful with it.
 
Old 06-23-2004, 01:42 AM   #3
sknarf
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Original Poster
Rep: Reputation: 0
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!
 
Old 06-23-2004, 01:56 AM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 06-23-2004, 01:59 AM   #5
jacky
LQ Newbie
 
Registered: May 2004
Posts: 21

Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using command fdisk -l ? AkshatBhandari Linux - Newbie 2 03-17-2005 12:36 PM
fdisk command, for / value / do - unsure linuxchump Programming 4 03-13-2005 04:56 AM
fdisk command not found ryancherry Fedora 2 06-12-2004 06:56 PM
fdisk command thefetus Linux - Newbie 5 11-19-2003 02:15 PM
fdisk not a command? toob Linux - Newbie 11 04-26-2003 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration