LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-26-2010, 05:46 AM   #1
atul1958
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Rep: Reputation: 0
linux command problem...


hello frends

root@ubuntu:~# gedit ~/.bashrc
Command 'gedit' is available in '/usr/bin/gedit'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
gedit: command not found


while runing any cmd,i m getting same problem....

pls help me...
 
Old 01-26-2010, 05:50 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I am not terribly well versed in Ubuntu, but I am fairly sure the problem is that the root user is never supposed to be used in Ubuntu. It is specifically designed to prevent you from performing any opperations with the root account.

The supported method for running commands or programs with root-level permissions is to use sudo from your normal user.
 
Old 01-27-2010, 12:51 PM   #3
atul1958
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Original Poster
Rep: Reputation: 0
ok....

but how to remove this problem...????
 
Old 01-27-2010, 01:02 PM   #4
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Quote:
Originally Posted by atul1958 View Post
ok....

but how to remove this problem...????
You are not login as root are you ?
If not try to become root with the command
sudo su enter
password enter
and than do what you like to do before closing the terminal type exit enter

Last edited by ronlau9; 01-27-2010 at 01:05 PM.
 
Old 01-27-2010, 01:16 PM   #5
gjatute
LQ Newbie
 
Registered: Jan 2010
Posts: 18

Rep: Reputation: 1
Maybe I'm missing completely the problem but...

First /usr/bin usually IS included in the default PATH (a lot of important stuff is located there). If the problem was the path you wouldn't be able to call gedit from the terminal.

Second: to edit the .bashrc located in the home directory you don't need root privileges.

If I missed the point: sorry
 
Old 01-28-2010, 12:08 AM   #6
atul1958
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Original Poster
Rep: Reputation: 0
thnx...

i m loged in as a root...actualy i was instaling ns2...so i edited .bashrc file..
but cud nt succeeded at all.then i try to install nctuns,then again i edit .bashrc..after that none of the command is running n showing the same error...so wat to do nw...shud i format my lappy..or else there is any solution..
 
Old 01-28-2010, 04:17 AM   #7
gjatute
LQ Newbie
 
Registered: Jan 2010
Posts: 18

Rep: Reputation: 1
The fact that you cannot run commands suggests that you messed up with the PATH. Could you be more precise about the editing you did on the .bashrc? Can you log in properly?
 
Old 01-28-2010, 10:22 AM   #8
sohail0399
Member
 
Registered: Oct 2008
Location: Pakistan, Islamabad
Distribution: CentOS, Fedora, Solaris
Posts: 154

Rep: Reputation: 23
Try this to set path

PATH=$PATH:/usr/bin/
export PATH
 
Old 01-30-2010, 03:58 AM   #9
atul1958
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Original Poster
Rep: Reputation: 0
thnx a lot sohail...

ur PATH is working...
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux command line problem mickeyboa Fedora 3 03-20-2007 07:42 PM
problem in rsh command in linux gopi_raghu Linux - Software 4 01-19-2007 03:22 AM
Simple Linux command Problem GUIPenguin Linux - Newbie 2 09-23-2004 04:47 PM
weird command problem in linux sonesay Linux - Newbie 9 05-21-2004 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:57 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
Open Source Consulting | Domain Registration