LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-25-2004, 10:33 AM   #1
gbrewste
Member
 
Registered: Jun 2004
Location: Illinois
Distribution: Fedora 2
Posts: 44

Rep: Reputation: 15
Can't get fdisk to work


I have been working on this problem all morning, and am now getting a bit frustrated.

All I am trying to do is mount a fat32 partition (vfat) so that I can share some files between Windows and Linux.

I need to see a list of my partitions so I mount the correct one which I know I can do by typing fdisk -l

The problem is, I can't get the fdisk command to work even though I log in as su. I have a feeling that this has to do with the the lack of a path to /sbin. However, even if I cd to the /sbin directory and type fdisk -l I still get the command not found error. I can, however, get the man pages.

I am running FC 2 on my laptop. On my 60 gig hd I have a NTFS partition with Windows XP installed, then a 10 gig fat partion, then my Linux partitions. I am pretty sure that the partition I want to mount is hda2, but I wanted to make sure first using the fdisk command.

So, the real problem is why can't I get this command to work. It also seems like the only text editor I can pull up is vi which I am not fond of using (personal preference; no disrespect to vi users intended)

Can someone please help a relative newbie out here.

Thanks,
Geoff
 
Old 06-25-2004, 12:42 PM   #2
gbrewste
Member
 
Registered: Jun 2004
Location: Illinois
Distribution: Fedora 2
Posts: 44

Original Poster
Rep: Reputation: 15
Although I haven't solved the particular problem (I am still a bit confused about path statements) I have gotten fdisk to run. From the sbin directory, I typed ./fdisk -l which worked. Luckily, I ran into a fellow worker who knows more about Linux than I do.

I would like to ask a couple questions about the path statement.
Is this basically the same thing as in DOS?

Since I am still learning about where Linux puts its files (I have read a bit about it), what is your advice regarding what directories I should put in path?

Where is the best place to configure the path statement? I have heard that bashrc is one way, but I suspect there are others.

Sorry for the Newbie questions. I am really trying to learn this stuff by searching first, but sometimes I get overwhelmed by the amount of information.

Thanks,

Geoff
 
Old 06-25-2004, 01:04 PM   #3
linuxmarc
Member
 
Registered: Jun 2004
Posts: 44

Rep: Reputation: 15
The $PATH variable is pretty much the same as DOS/Windows. I typically configure it in .bash_profile (the . in the filename hides the file) and include $PATH, then whatever else I want to add in there. When you su, your user variables carry over. To apply root's variables you should use su - (su dash).

/sbin and /usr/sbin are system specific binaries and are typically only available to root.
 
Old 06-25-2004, 04:32 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,430

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
The difference between linux and windows/DOS is that linux only searches for a command using the path environment. Since /sbin isn't usually in a users path you would still get a "Command not found" error even though your current working directory (i.e. cd to /sbin) was /sbin.

./ is a shortcut for current working directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fdisk command - can't get it to work!! sknarf Linux - Software 4 06-23-2004 02:59 AM
fdisk -l does not work endezeichen Linux - General 2 11-22-2003 08:02 PM
PartitionMagic 7.0 and DOS fdisk don't work anymore gfischer Linux - Newbie 1 08-17-2003 03:09 PM
need to get rid of redhat 7.2, and no fdisk wont work redcommie Linux - General 5 12-05-2002 07:46 AM
Why doesn't fdisk work for me? rdaves@earthlink.net Linux - Newbie 5 05-22-2001 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration