Ubuntu – Why is the alias now not working

aliascommand line

So before I reformatted (to get rid of Windows), I simply used this command to open documents by putting it at the end of the ~/.bashrc file:

alias commandless= 'gnome-open ./Documents/the-linux-command-line.pdf; gnome-open ./Documents/linux.odt'

But now everytime I start the terminal, it says:

bash: alias: gnome-open ./Documents/the-linux-command-line.pdf; gnome-open ./Documents/linux.odt: not found

before even typing anything in, and when I run the command nothing happens, not even error messages.

Best Answer

Use double quotes instead of single quotes:

alias newcommand="full path of the binary to be executed"

and not:

alias newcommand='full path of the binary to be executed'

No space near equal either on the left or on the right.