How to fix “command not found” when it appears starting terminal on ubuntu

Thanks Xen2050, I was checking my bashrc file (with echo "step1"...)and I found this part:

###-tns-completion-start-###
if [ -f /home/anargu/.tnsrc ]; then 
    source /home/anargu/.tnsrc 
fi
###-tns-completion-end-###

Well I coul identify it because I installed nativescript (https://www.nativescript.org/) and this part of code correspond to it. When I commented (put several "#") those lines, the:

Support: command not found just dissapeared.

I think I solved this problem just commenting that part of code because then I couldn't find any problem at the moment. Thank you so much!


The bash error "xxxxxx: command not found" shows up when you try to run a command/program that's not installed or not in the path, etc. Per Hastur's comment, searching for "Support" in .bashrc is a great idea, and check .login & .profile too if they exist (I don't think they should be running just for opening a terminal.

Could be in the ~/.bashrc file. In general to find a mystery error I'd test it like this:

Try opening a terminal and type

source ~/.bashrc

If the error shows up, then it's definitely something in there that's the problem. Look through the file for the line that causes the error - could go line by line pasting into a terminal if it's not overwhelming, or add echo "step 1" ... echo "step 2" etc lines to narrow it down. Then remove/modify the offending line.


Answer by @Anargu lead me to the source of the problem. In ~/.tnsrc I had a comment on the first line that hasn't actually been commented out. The first word of the statement was Support, that's why the error showed that word.

I've opened the file, deleted the line, and the error stopped showing up.

Tags:

Linux

Ubuntu