Let’s try to run
netstat
with the spelling
nestat
, which eventually will result in not being able to execute the command.
dev-ubuntu% nestat
zsh: command not found: nestat
Code language: Bash (bash)
To Fix this
Check the command for its name or use the
thefuck
package to rectify the command.
Solution 3 – Make sure the Package is installed on your System
Many times it happens that due to some reason a User has to uninstall the package but still after uninstalling the package the user tries to access the command resulting in
Command not found Error
Let’s take an Example
If we’re trying to access the
npm
package but the package
npm
is not installed on the system, or if we’re trying to access the
react
package but it’s not on the path or installed at the
global
level, it’ll result in
Command
not Found* Error.
dev-ubuntu% npm
zsh: command not found: npm
Code language: Bash (bash)
To Fix this
try running the command to Install the package which you’re trying to access or hit this command
sudo apt install package-name
If you’re trying to access the package which is not on the $PATH, it’ll result in the error of Command not Found.
dev-ubuntu% npm
zsh: command not found: npm
Code language: Bash (bash)
To Fix this
Try adding the location of the package to the $PATH
Unix users can try running this command
export "$PATH:/home/coderaman7/.local/.bash"
Code language: Bash (bash)
Solution 5 – Setup .zshrc file to export your Paths
Sometimes due to some error or mishandling, the .zshrc the file gets deleted which will eventually result in loss of Data and the command not being able to execute, due to misconfigurations of the PATHS.
To fix this
- Create a new file at the root of your Machine named
.zshrc - try running command
export "$PATH:/home/coderaman7/.local/.bash"
Conclusion