LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-15-2011, 12:13 AM   #1
mvanil
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
Commands not woking


Hi,

Commands not woking, its shows the message "command not found" even for ls command. I can't execute any commands in CLI,How can I solve the problem ?

regards

Anil
 
Old 11-15-2011, 12:23 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
does it work if you specify the full path to the command?
ie:
Code:
 $ /bin/ls
If so, something has gone wrong with your path.

Code:
 $ echo $PATH
What does this show?

Check your .bashrc and .bash_profile as well as /etc/bashrc for the PATH variable.
It should go a little something like this (but possibly different)
Code:
/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:~/bin/:/usr/local/bin:/usr/local/sbin:/usr/local/usr/bin/:/root/bin
 
Old 11-15-2011, 01:15 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
In addition, how about giving us some details? Just saying "It doesn't work" doesn't do much good when you're trying to determine what the problem is.
  • What distribution are you using?
  • What shell are you using?
  • What terminal or terminal emulator are you using?
  • When did the problem start?
  • What did you do just before it started?
  • What have you tried so far to diagnose/remedy it?
  • Does it continue after restarting the shell, desktop, or system?
  • What other possibly relevant details can you give us?

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old 11-16-2011, 01:25 AM   #4
mvanil
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
I am using centos5.5, using bash shell. I can't login in GUI its showing an error
"Your session only lasted less than 10 sec" /etc/gdm/Presession/Default:Registering your session with u tmp........(~/.xsession-errors file).

When I login in CLI(ctrl+alt+f1) as root shows one message like
Sh:gzip:command not found
Bad character height 0


The result of echo $PATH is /usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/root/bin
So I have to export PATH=$PATH:/bin:/usr/local/bin

I checked the files .bashrc ,.bash_profile and /etc/bashrc , there is no changes.

Last edited by mvanil; 11-16-2011 at 03:12 AM. Reason: for adding information
 
Old 11-16-2011, 03:24 AM   #5
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
I hope, it will help.
http://www.cyberciti.biz/faq/linux-u...get-rid-of-it/
 
  


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
busybox installation not woking anshexp Linux - Kernel 0 08-27-2009 01:03 PM
Rc.local not woking in Fedora 10 gfem Fedora 7 01-20-2009 04:50 PM
Mouse is not woking on Redhat addiss Linux - General 1 01-10-2009 08:43 AM
Apache sever is not woking with firewall noorudin Red Hat 1 10-28-2006 06:02 AM
Problem With LINUX Woking leonidg Linux - General 4 12-07-2004 02:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:35 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