5

I did

r00t@wutdo~$ alias daoc='mono "~/.wine/drive_c/Program Files/DAoC/Portal.exe"'
r00t@wutdo~$ daoc

Works fine and dandy but after reboot the alias isn't saved.

r00t@wutdo:~$ alias
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal 
|| echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*
alert$//'\'')"'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'

How can I set a permanent alias?

Kenny Rasschaert
  • 9,045
  • 3
  • 42
  • 58
wiggaplz
  • 51
  • 1
  • 1
  • 2

2 Answers2

9

Put it in ~/.bashrc or ~/.bash_aliases depending on your setup (or .zshrc, etc).

Rob Wouters
  • 1,927
  • 1
  • 11
  • 4
0

To edit the .bashrc file you can follow the below steps:

ls -al .bashrc >>> 
vi .bashrc

At the end of the file, enter the alias command:

:wq >>>

to save and exit the VI editor. Then run:

source ~/.bashrc
KKS
  • 11
  • 1