MathsGee Answers is Zero-Rated (You do not need data to access) on: Telkom | Dimension Data | Rain | MWEB
First time here? Checkout the FAQs!
x
MathsGee is Zero-Rated (You do not need data to access) on: Telkom |Dimension Data | Rain | MWEB

0 like 0 dislike
39 views

Every command fails with command not found. How do you trace the source of the error and resolve it?

in Data Science & Statistics by Diamond (75,934 points) | 39 views

1 Answer

0 like 0 dislike

It looks that at one point or another are overwriting the default PATH environment variable. The type of errors you have, indicates that PATH does not contain e.g. /bin, where the commands (including bash) reside.

One way to begin debugging your bash script or command would be to start a subshell with the -x option:

bash --login -x

This will show you every command, and its arguments, which is executed when starting that shell.

Also very helpful is show PATH variable values:

echo $PATH

If you run this:

PATH=/bin:/sbin:/usr/bin:/usr/sbin

most commands should start working - and then you can edit ~/.bash_profile instead of ~/.bashrc and fix whatever is resetting PATH there. Default PATH variable values for root and other users is in /etc/profile file.

by Diamond (75,934 points)

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Aug 29, 2019 in Data Science & Statistics by MathsGee Diamond (75,934 points) | 41 views
0 like 0 dislike
0 answers
0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
asked Aug 29, 2019 in Data Science & Statistics by MathsGee Diamond (75,934 points) | 48 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

MathsGee provides answers to subject-specific educational questions for improved outcomes.



On MathsGee Answers, you can:


1. Ask questions
2. Answer questions
3. Comment on Answers
4. Vote on Questions and Answers
5. Donate to your favourite users

MathsGee Tools

Math Worksheet Generator

Math Algebra Solver

Trigonometry Simulations

Vectors Simulations

Matrix Arithmetic Simulations

Matrix Transformations Simulations

Quadratic Equations Simulations

Probability & Statistics Simulations

PHET Simulations

Visual Statistics

Other Tools

MathsGee ZOOM | eBook

16,915 questions
12,344 answers
122 comments
2,436 users