Either a typo (command spelled wrong) or missing file for a command...
Another possibility is a bad PATH variable, so that it can't find it... You can try typing the command prefixed by a ./ (dot and slash) to see if it will run from the current directory even if not in the PATH.
2007-09-08 23:48:44
·
answer #1
·
answered by N2FC 6
·
3⤊
0⤋
If you know that you definately have that program installed (say that you KNOW you have ifconfig installed so that you can see you IP info) but when you type it you get 'command not found', that particular command may only be usable through the use of a superuser account.
Swich to the superuser account by doing the following:
su -
the hyphen is important - it switches to the root (superuser) profile. The type your password for the root account and type your command.
If it still says command not found then it probably is not installed or you have the command wrong. Install it with apt-get or yum.
2007-09-08 23:48:27
·
answer #2
·
answered by feckless_mess 1
·
0⤊
0⤋
"echo" should return almost immediately for a literal or a simple environment variable. If the value to be echoed is the result of a more complicated calculation, such as a loop, or a value dependent on user input, it could take any amount of time -- or possibly never return at all! In general, the amount of time to return from a terminal command is on the order of milliseconds. If you need to calculate an exact value, set a variable to the current time, execute the command, set another variable to the current time, and then subtract the two variables.
2016-05-20 02:37:36
·
answer #3
·
answered by ? 3
·
0⤊
0⤋
It sounds like this only happens in the Root account. Try this:
echo $PATH
Do it as both root and as a normal user. It will give you something like:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
These are all directories that the console will look in to find a program. They should be similar, except root should also include /sbin and /usr/sbin.
If this is not the case, there are several places you can edit that will change it. Look in each of the following files in this order (as root), and see if there is a line that says PATH=/xx/xx:/xxx/xxx etc. Add any directories that are available to normal users but not available to root. Note that the first few filenames have a fullstop (period) at the start, e.g. /root/[dot]profile - this stops them from being displayed by a normal file listing (go to "Show hidden Files" if you need to see them from a file manager)
/root/.profile
/root/.bashrc
/etc/profile
/etc/bash.bashrc
Then log out and log back in again.
If that doesn't work, you may have to find out where the file is by typing in (as a normal user)
whereis file-you-want-to-find
or (as root)
updatedb
locate file-you-want-to-find
updatedb takes a long time - don't worry, it hasn't crashed!
(note: If that last command comes up with too many results, try locate bin/file-you-want-to-find as this will most likely only find programs)
Once you've found the program you want, take the path up to that folder and add it to the PATH= in the above files, not including the filename itself. Remember to log out and log back in again!
2007-09-10 07:55:51
·
answer #4
·
answered by MattyB 2
·
1⤊
0⤋
If you are sure that the command is a valid linux command, it might indicate that the command's file in the root directory is missing or corrupted!
2007-09-08 23:56:41
·
answer #5
·
answered by Lothan M. 1
·
0⤊
0⤋
It's a matter of PATH and permission. If the command is in the path, then check the permission: are you the owner, belong to the same group, or other?
2007-09-09 01:48:41
·
answer #6
·
answered by geonautika 4
·
0⤊
0⤋
there is a folder with a list of valid commands i think, though i have forgotten where it is
if you are using ubuntu try 'sudo __' where '__' is the command u want, this gives u superuser privileges
if you want to execute a binary, i usually just drag the folder from the GUI to the bash shell emulator and it automatically does something with it when u press enter :)
2007-09-08 23:53:00
·
answer #7
·
answered by pezcadorissimo 2
·
0⤊
0⤋