Wednesday, September 26, 2018
Home > Linux > Command not found for every command in Ubuntu

Command not found for every command in Ubuntu

Command not found for every command in Ubuntu

How to fix this error while doing some changes in .bashrc file I messed up something and

now for each command execution this error coming like “command not found” as shown in Image – 1

Command not found for every command in Ubuntu

Image – 1

To overcome this issue we need to add path to the PATH variable. all user commands are located in

/bin and /usr/bin or /usr/local/bin directories. all programs are installed in these directories.

Execute above command to add path to PATH variable.

and now if you do ls or type any command it wont show “command not found” error.

Still if you reboot the machine again it will show the same error.

To fix this issue permanently we need to add the location to .bashrc file

so that this issue does not comes up again. To add the default location of all the directories

in the PATH variable which contains all the executable files in Linux in .bashrc file.

Go to end of the file and add this line

Save and exit from the editor.

Now if you reboot the machine also you will not get that error while executing any command in terminal.

 

You might like:

How to install nginx, mysql, phpmyadmin, php in Ubuntu

How to install .deb file in Ubuntu

How to resolve network wifi issue in Ubuntu 16.04 LTS

VPN Connection issue in Windows 10

New Features Of Windows 10 Operating System

Durga Charan Ojha
I am a proud Indian, proud father, a blogger, Being in a profession as System administrator, my passion is troubleshooting computer issues, I do like sharing solutions through blogging making videos of solving issues.
https://lifeonnetwork.com/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.