Where can I find a list/file of all aliases created in Ubuntu 17.04? I mean shortcuts for commands most frequently used and more.
List of defined aliases
alias, you'll get a list of all defined ones in your environment.
$ alias alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto'
List along the file they've been set in
To find the files that your aliases have been defined in, use this solution, with a little bit altering it:
$ PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7> /tmp/mylog $ grep "alias " /tmp/mylog | grep -e /home -e /etc
Which gives you a list of files, stating what
alias defined there, the output is similar to:
++/home/ravexina/.bashrc> alias 'la=ls -A'
'la=ls -A' has been set in my
There are many places that we can define our aliases, the most important ones might be:
- Standard ones:
- One of them in order:
- Works but not a good place, unless you want it system wide:
And any other place which get sourced while running a shell.