environment variables - -bash: sudo: No such file or directory -


this question has answer here:

whenever opening terminal, end same error.

-bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/hadoop/bin': not valid identifier 

and whenever running command lines, terminal throws error, like

-bash: sudo: no such file or directory 

i can't edit ~/.bashrc through gedit ~/.bashrc think problem. echo $path gives me empty line though.

by way, stuff happen under personal account. there's dedicated hadoop user account, created running hadoop , in fact works fine without glitch.

i appreciate if tell me what's going on here, , it's been frustrating me week or so. in advance.

edit:

it turned out before created second account(for hadoop), modified bashrc @ end of file, totally forgot. therefore bound run trouble. hugh again guys helping me out, reminding me check bashrc file , how run command line in situation.

run this:

/bin/bash --noprofile --norc 

then should have bash prompt tame enough use without getting errors time.

now use /bin/mv ~/.bashrc ~/.bashrc-old rid of .bashrc file presumably causing problems.

then use /bin/cp /etc/skel/.bashrc ~/ new .bashrc

alternatively, can try this, work existing .bashrc, bit of punt:

/bin/sed -i.bak 's/export path /export path=/' ~/.bashrc 

this replaces line export path /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/hadoop/bin same thing except = instead of space, looks root of problem.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -