3

I created the file ~/.bash_aliases within these lines:

# my alias here

eclipse="eclipse</dev/null &>/dev/null &"
okular="okular</dev/null &>/dev/null &"
libre="libreoffice</dev/null &>/dev/null &"

My ~/.bashrc is ready to find aliases:

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

I then executed . ~/.basharc and also source .bashrc but aliases I created still don't work.

heemayl
  • 91,753
glc78
  • 481
  • 4
    Maybe because you are missing the alias in front of each line. What you are defining now is variables, not aliases. – Soren A Mar 17 '18 at 11:35

1 Answers1

7

You have defined plain variables, not aliases.

The alias definitions in bash must start with the keyword alias, so make the definitions as:

alias eclipse="eclipse </dev/null &>/dev/null &"
alias okular="okular </dev/null &>/dev/null &"
alias libre="libreoffice </dev/null &>/dev/null &"
heemayl
  • 91,753
  • Yes, sorry but I founded an example onile that omitted alias for some reason and I replicated it without thinking. It's clear now. – glc78 Mar 17 '18 at 12:31
  • @Glk-78 Now you've found a very good reason to avoid random technical articles on the internet. – heemayl Mar 18 '18 at 08:00
  • True, but I also paid few attention. Maybe at the lines above there was somekind of explenation I didn't see. – glc78 Mar 18 '18 at 11:22