Everytime i type in a command line, it just says "command not found"

Asked by don miguel pasion

Everytime i have a problem i go to the terminal and type in the command needed, but it always says "command not found"

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcus aurelius (adbiz) said :
#1

what commands were you trying to type?

you can easily find out if the command is valid or not by typing "man" then the command. this will give you info on how to use the command.

if it doesn't show anything, then that comman doesn't exist.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2

In addition to telling us what commands you're trying to run (or, even better, try to run some, then select all the text in the Terminal with Edit > Select All, copy it to the clipboard with Edit > Copy, and paste it here), please also provide the output of this command:

type ls; echo $PATH

Revision history for this message
Midnight Matt (randygaffer) said :
#3

Enter the command `whereis`, followed by any of the commands you're having trouble with. You should see the name of the command with a colon appended. If that software exists on your computer, it will be followed by a list of pathnames to it.

whereis ls
ls: /bin/ls /usr/share/man/man1/ls.1.gz

Then check the content of your PATH variable (echo $PATH) to see if the path to the directory containing your command is included. In the example above, that would be `/bin`. If it isn't, you can add it to the list with the syntax `PATH="$PATH:pathname"`, replacing `pathname` with the path in question.

And if the command doesn't exist on your computer, obtain and install it, using the syntax `sudo apt-get install [command]` or another source of your choice, then follow the above directions. Good luck.

Can you help with this problem?

Provide an answer of your own, or ask don miguel pasion for more information if necessary.

To post a message you must log in.