1

While setting environment variable in ubuntu 14.04(trusty) ec2 instance I have mistakenly did some typo. So now every time I log in I get following error on command line.

-bash: export: `/usr/sbin/sendmail:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games': not a valid identifier

Since a newbie to Ubuntu environment I am not able to figure it out by myself. Any help would be appreciated. Thanks.

1

1 Answer 1

0

Since it happened every time you logged in, it should be on in one of the startup scripts. Which might be:

  • .profile
  • .bashrc

please execute the below two commands

grep "/usr/games" ~/.profile
grep "/usr/games" ~/.bashrc

and see if one of those files holds similar line to the error you are facing.

I guess, that the original line was something like:

export PATH=/usr/sbin/sendmail:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Once you'll find the source of the problem, you'll have to decide if you want to remove this line, or update it (e.g. by setting those values into the relevant variable)

1
  • I got the solution. Thanks. The line was in the ~/.bashrc file. Mar 29, 2017 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .