Ubuntu – Problem in creating alias, get strange messages

aliasbashbashrccommand line

[Reviewers: note that the question was completely rewritten after the close votes.]

I recently found how I can define aliases for bash in the ~/.bashrc.

But since I tried that, I see the followig messages eveery time I open a terminal.

I added some bash aliases to my I was trying to create shortcuts using alias but I unsuccessful and somehow managed to get the message below every time I open up a new terminal.

bash: alias: UIC: not found
bash: alias: =: not found
bash: alias: sudo openvpn --config ~/vpn/UIC-alopez78.ovpn: not found
bash: alias: mat: not found
bash: alias: =: not found
bash: alias: cd /home/alexisblopez/MATLAB/R2014a/bin/: not found
bash: alias: lab: not found
bash: alias: =: not found
bash: alias: ./matlab: not found
~$ 

Its's confusing; it does not say error, but because my aliases do not work,
I think I did something wrong with them – I don't know what!

Best Answer

Probably you defined these alias in .bashrc file:

alias UIC = 'sudo openvpn --config ~/vpn/UIC-alopez78.ovpn'
alias mat = 'cd /home/alexisblopez/MATLAB/R2014a/bin/'
alias lab = './matlab'

You should edit .bashrc and remove space before and after =:

alias UIC='sudo openvpn --config ~/vpn/UIC-alopez78.ovpn'
alias mat='cd /home/alexisblopez/MATLAB/R2014a/bin/'
alias lab='./matlab'

save your changes and run source .bashrc

Related Question