alias command and shell aliases
Aliases are positional parameterless macros which are functional only in interactive sessions.  Aliases are not expanded when the shell is not interactive, unless the 
`expand_aliases' shell option is set using `shopt' (*note Bash Builtins::).  
They are recognized only 
as the first word of the command string. And they allow only simple substitution.  
The shell maintains a list of aliases that may be set and unset with the 
`alias' and `unalias' built-in commands.  
	
		alias 
		 
		- 
		
alias [-p] [name[=value] ...]
		Without arguments or with the 
		`-p' option, alias 
		prints the list of aliases on the standard output in a form that 
		allows them to be reused as input. If arguments are supplied, an 
		alias is defined for each name whose value 
		is given. If no value is given, the name and value of 
		the alias is printed. 
		 
		unalias
		 
		- 
		
unalias [-a] [name ... ]
		Remove each name from the list of aliases. If `-a' 
        is supplied, all aliases are removed. 
		 
	
Options: 
   -p   Print the current values
   -a   Remove All aliases
Aliases don't allow for control flow, command-line arguments, or other 
features that makes the command line so useful. For any more or less complex 
case, shell functions are preferred over aliases. 
Additionally, the rules surrounding alias expansion are tricky, enough 
so that the bash(1) man page recommends "To be safe, always put alias definitions 
on a separate line, and do not use alias[es] in compound commands."
To create aliases shell contain special built-in alias command. The syntax 
for the Korn shell and its derivatives like bash is:  
	alias name="value" 
	
For example we can create an alias for the alias command: 
	alias a="alias"
Without arguments or with the -p option, alias prints the list of aliases on the standard output in a 
form that allows them to be reused as input.  It the name of alias is given then only this particular alias (if it exists) is 
printed. 
Default aliases 
In Red Hat there are predefined aliases but their definition is hidden in /etc/profile.d 
Default aliases provided with CentOS 7 are as following
   [bezrounn@test01 ~]$ alias
   alias egrep='egrep --color=auto'
   alias fgrep='fgrep --color=auto'
   alias grep='grep --color=auto'
   alias l.='ls -d .* --color=auto'
   alias ll='ls -l --color=auto'
   alias ls='ls --color=auto'
   alias mc='. /usr/libexec/mc/mc-wrapper.sh'
   alias vi='vim'
   alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
NOTE: The alias ll definition is of low quality. It is better to define the alias ll as following:   
alias ll="ls -hAlF"
which along with the listing of hidden files (files that start with dot; option -a) also provide "human" listing for size (option 
-h) and adds trailing slashes for directories (option -f). Another  useful option that I would recommend is  
--group-directories-first  which helps to separate directories form regular file like in Midnight Commander panels: 
alias ll="ls -hAlF --group-directories-first"
 
The Korn shell comes with a default set of predefined aliases. 
	alias autoload='typeset -fu'
alias false='let Ø'
alias functions='typeset -f'
alias hash='alias -t' -
alias history='fc -l'
alias integer='typeset -i'
alias r='fc -e -'
alias stop='kill -STOP'
alias suspend='kill -STOP $$'
alias true=':'
alias type='whence -v'
To display the list of current aliases, type alias and press Return
As I mentioned above aliases are essentially simple positional parameterless 
macros. The first word of each command, if unquoted, is checked 
to see if it has an alias. If so, that word is replaced by the text of the 
alias. The alias name and the replacement text may contain any valid shell 
input, including shell metacharacters, with the exception that the alias 
name may not contain `='. The first word of the replacement text is tested 
for aliases, but a word that is identical to an alias being expanded is 
not expanded a second time. This means that one may alias `ls' to `"ls -F"', 
for instance, and Bash does not try to recursively expand the replacement 
text. 
If the last character of the alias value is a space or tab character, 
then the next command word following the alias is also checked for alias 
expansion. 
In ksh and bash there is no mechanism for using arguments in the replacement 
text, as in `csh'. If arguments are needed, a shell function should be used
The rules concerning the definition and use of aliases are somewhat confusing. 
Bash always reads at least one complete line of input before executing any 
of the commands on that line. Aliases are expanded when a command is read, 
not when it is executed. Therefore, an alias definition appearing on the 
same line as another command does not take effect until the next line of 
input is read. 
The commands following the alias definition on that line 
are not affected by the new alias. This behavior is also an issue when functions 
are executed. Aliases are expanded when a function definition is read, not 
when the function is executed, because a function definition is itself a 
compound command. As a consequence, aliases defined in a function are not 
available until after that function is executed. 
To be safe, always put 
alias definitions on a separate line, and do not use `alias' in compound 
commands.  
Warnings:
	- 
	
 Aliases are very useful things, but 
	I hope that you will find functions at least as interesting and even 
	more useful. You should be very careful replacing a standard command 
	with an alias or a function. This is a questionable practice that often leads to unanticipated side effects. One such 
    effect is that when you work on a  a new to you system, you might automatically assume that it has the same set of aliases 
    while it does not. That is an invitation to SNAFU. 
	 
	- 
	
It's too easy to really hurt yourself by 
	trying to execute your alias when it doesn't exist. Imagine the difference 
	between doing this:
	 
	$ alias rm='rm -i'
$ cd ~/scratch
$ rm *  # here the rm alias catches you and interactively
     # deletes the contents of your current directory
	and then later in the same session doing this:
	$ su -
# cd /tmp
# rm # here the rm alias no longer exists, and you whack a bunch of stuff out of /tmp
TIPS
use a separate file for aliases
Use your favorite text editor to create a file called. for example,  ~/.bash_aliases, or .aliases.   
The source them for approriate file (for example from section of .barshrc that executes for interactive sesssions:
   if [ 
   -f ~/.bash_aliases 
   ]; then
   . ~/.bash_aliases
   fi
using another file for aliases is much more clean, also portable between different distributions and different servers. 
You can imitate one argument to an alias: If the last character of the alias value is a space or tab character, 
then the next command word following the alias is also checked for alias expansion.
   
- The alias name and the replacement text can contain any valid shell input, including shell metacharacters, 
   with the exception that the alias name can not contain `='. 
 
- Never define aliases for standard commands.
   The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded is not 
   expanded a second time. This means that one can alias ls to "ls -F", for 
   instance, and Bash does not try to recursively expand the replacement text.
 
- Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt . 
 
 
'alias' and 'unalias' are BASH built-ins. For almost every purpose, shell functions 
are preferred over aliases. 
Examples
Create an alias 'c' that will clear the screen:
$ alias c='clear'
Create an alias 'ls' that will change the default action of ls:
$ alias ls='ls --classify'
$ ls 
$ unalias ls
More aliases for ls:
$ alias la='ls -lAXh --color=always'   #Show all, sort by extension 
$ alias ls-al='ls -al'   #fix typo missing space 
$ alias l="ls -l"
$ alias la="ls -la"
Use alias to cd into to sub-sub directories:
$ alias ..='cd ..' 
$ alias ...='cd ../..'
$ alias ....='cd ../../..'
 
Use alias to fix missing space typos:
$ alias cd..='cd ..'
Display the working directory 
$ alias .='echo $PWD'
Prevent accidental deletions by making rm interactive: 
$ alias rm='rm -i'
Shorten apt-get installation commands: 
$ alias canhaz='sudo apt-get install'
Run firefox and open a specific website:
$ alias fftr='/home/simon/firefox/firefox https://ss64.com'
“There are many reasons why novelists write, but they all have one thing in common - a need to create an 
alternative world” ~ John Fowles
Plain vanilla RHEL 7 is  missing many important elements that make working on the console more comfortable. For example, 
alias ls is defined incorrectly for sysadmin.  Do the first task is slightly customize you environment adding a couple of aliases that 
will make you work more productive. It take a minute or two. You need to add it either to  /root/.bashrc and /root/.bash_profile. 
Aliases are ignored for non interactive session no there is no harm to add them to .bashrc, which is executed for interactive 
non-login shells, while .bash_profile is executed only for login shell. 
The main annoyance is  that Red Hat does not ship with proper definition for ll alias for root (the alias is 
defined in /etc/profile.d/colorls.sh file ). It make sense to add it to /etc/profile or /root/.bashrc at the beginning of the exam and 
then adding more aliases as you proceed. Save and close the file. and enter after you modified it.  For example, is you added 
it to /root/.bashrc enter: 
. /root/.bashrc
This  will source your changes into your current environment. Otherwise any aliases you added will be available next time 
you start a new shell session.  
Here are some more elaborate tuning suggestion (which of course is optional, as time is money in case of RHCSA exam ;-):  
###############################
#       My customarization
###############################
expoert PAGER=less
export LESS='-X'
alias ll='ls -hAlF --group-directories-first' 
alias lll='ls -hAlF --group-directories-first | less -XF' # useful for browsing large directories like /etc, if you do not use Midnight Commander.
export PROMPT_DIRTRIM=3 # allot to see three last directories in the commnd prompt, if \w mact is used PS1 system variable
export PS1='[$?]\h@ROOT:\w \$ ' # this way you can  see Rc of the last command immediately without typing echo $? 
alias cd='pushd' # this creates a stack of directories and this simplifies navigation. You can list stack with dirs 
alias vi='vim' # this provides "true vim" set of command which is better for working with multiple files 
The last alias (alias cd='pushd') tried to solve the problem of working with deeply  directories typical for modern OS 
filesystems. It is clear that cd command is not well suited for this even if you try to retrieve previous command form the 
bash command history as long targets for cd are rarely typed as absolute path.  You need something like 
directories favorites.  The simplest way to get functionality like this is via pushd/dirs/popd commands. While this  is 
not the best option, you can just define function dir  which will execute the command pushd via some simple function  
which preserves cd - (go to prev directory) and cd (go to home directory) functionality which is lost is you 
redefined cd via alias to pushd (cd - should be entered as cd -1 in this case)
function cd {
   if (( $# == 0 )); then
      builtin cd
   elif [[ $1 = '-' ]]; then 
      builtin cd -
   else 
      pushd $@
   fi
}
Another problem  is that in  RHEL7 default level of logging systemd is info and it pollutes logs making it unreadable. You 
may wish to change this to to the level "warning" using 
commands
systemctl -pLogLevel show
systemd-analyze set-log-level warning
systemctl -pLogLevel show
We can find files in our current directory easily by setting this alias:
alias look="find . -name "
This one will list our disk usage in human-readable units including filesystem type, and print a total at the bottom:
alias df="df -Tha --total"
We might as well add an alias for our preferred du output as well:
alias duh="du -ach | head -12 | sort -rn"
Let's keep going in the same direction by making our free output more human friendly:
alias free="free -mt"
We can do a lot with our listing process table. Let's start out by setting a default output:
alias psls="ps auxf"
How about we make our process table searchable. We can create an alias that searches our process for an argument we'll pass:
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
Now, when we call it with the process name we're looking for as an argument, we'll get a nice, compact output:
psgrep bash
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
1001      5227  0.0  0.0  26320  3376 pts/0    Ss   16:29   0:00 bash
One common option to the mkdir command that we use often is the -p flag to make any necessary parent directories. 
We can make this the default:
alias mkdir="mkdir -pv"
We added a -v flag, which can help us recognize quickly if we had a typo which caused an accidental directory branch:
When downloading files from the internet with wget, in almost all circumstances, you'll want to pass the -c 
flag in order to continue the download in case of problems. We can set that with this:
alias wget="wget -c"
We can search our history easily like with a grep of the history command's output. This is sometimes more useful than 
using CTRL-R to reverse search because it gives you the command number to do more complex recalls afterwards:
alias hgrep="history | grep"
I have a few system tools that I prefer to upgrade from the standard version to more complex tools. These will only work if you've 
downloaded the required utilities, but they can be very helpful. Keep in mind that these may affect your other aliases.
This one replaces the conventional top command with an enhanced version that is much easier on the eyes and can be sorted, 
searched, and scrolled without complications:
alias top="htop"
In a similar way, the ncdu command can be downloaded which presents file and directory sizes in an interactive ncurses 
display that you can browse and use to perform simple file actions:
alias mydu="ncdu"
Have you ever needed your public IP address from the command line when you're behind a router using NAT? Something like this 
could be useful:
alias myip="curl http://ipecho.net/plain; echo" 
 
Good luck !
Dr. Nikolai Bezroukov 
- 190321 : How do I create a permanent Bash alias -  Ask Ubuntu   ( How do I create a permanent Bash alias -  Ask Ubuntu,  ) 
 
- 190321 : alias Man Page - Linux - SS64.com   ( alias Man Page - Linux - SS64.com,  ) 
 
- 190321 : Linux.com CLI Magic Daily  aliases   ( Linux.com CLI Magic Daily  aliases,  ) 
 
- 190321 : Aliases  and Variables Keep Things Short and Simple   ( Aliases  and Variables Keep Things Short and Simple,  ) 
 
- 190321 : Jamies  Shell Stuff   ( Jamie's  Shell Stuff,  ) 
 
- 190321 :  [X-Unix] Quoting in bash aliases   (  [X-Unix] Quoting in bash aliases,  ) 
 
- 190321 :  Useful Bash Aliases and Other Stuff   (  Useful Bash Aliases and Other Stuff,  ) 
 
- 190321 :  OneOfOne - Tips-Bash Aliases   (  OneOfOne - Tips-Bash Aliases,  ) 
 
- 190321 :  bash.aliases [Homepage von Robert Kehl]   (  bash.aliases [Homepage von Robert Kehl],  ) 
 
- 190321 :  Functions and aliases in bash LG #53   (  Functions and aliases in bash LG #53,  ) 
 
   
      
         
            
               
                  
                     
                        
                           
                              
                                 I've made this little function for quickly writing a new-alias to .bashrc
##------------------------------------ ##
 #           -- new-alias --           #
 # creates new alias & writes to file  #
 #          $1 = alias new             #
 #          $2 = alias definition      #
##------------------------------------ ##
new-alias () { 
  if [ -z "$1" ]; then
    echo "alias name:"
    read NAME
  else
    NAME=$1
  fi
  if [ -z "$2" ]; then
    echo "alias definition:"
    read DEFINTION
  else
    if [ "$2" = "-cd" ]; then
      DEFINTION='cd '
    else
      DEFINTION=$2
    fi
  fi
  echo "alias $NAME='$DEFINTION'" >> ~/.bashrc
  . ~/.bashrc
}
                              
                              
                                 
                            
                           
                              
                         
                      
                   
                
             
          
       
    
    
Related linux commands
export - Set an environment variable
env - Display, set, or remove environment variables
echo - Display message on screen 
readonly - Mark variables/functions as readonly 
shift - Shift positional parameters
Equivalent Windows PowerShell command: Set-Alias - Create or change an alias,
Remove-item alias:aliasname
    
	created and tested all of the following aliases on SUSE 10 with the 
	bash shell.
	List the most recently modified files and directories
	
	alias lt='ls -alt | head -20' 
	Once it's loaded, typing lt lists the most recently 
	modified contents of the current directory. The -a and
	-l options show all files including hidden files in a long 
	listing format. Since I am usually interested in a file I have just 
	changed, I limit the output to 20 lines by piping the output from
	ls -alt to the head command. This example 
	also demonstrates that an alias may be a series of commands, rather 
	than just a short name for a single utility and its options.
	List only subdirectories 
	alias ld='ls -al -d * | egrep "^d"' 
	This alias shows only subdirectories of the current directory by 
	using egrep to limit the listing to entries with the d 
	(directory) attribute.
	Show the inode number for files in the current directory
	
	alias li='ls -ai1 | sort' 
	This alias prints the inode number for each file, sorted in ascending 
	order. The last option to ls in this alias is the numeral one, not the 
	letter L. You might need the inode number for file system repair, or 
	to track down a file name referenced by inode in an Security Enhanced 
	Linux (SELinux) log file. 
	Show the SELinux security context of all processes
	
	alias pss='ps --context ax' 
	As the SELinux code starts to appear in mainstream distributions, 
	the security context of processes is something you may need to track. 
	This alias displays the security context of all processes. The 
	--context option tells ps to display the security 
	context, while the a and x options combine 
	to select all processes.
	Fast directory navigation with pushd and popd
	
	alias +='pushd .' 
	alias _='popd' 
	I tend to move around a lot on the command line. If I am working 
	on code in a deeply nested directory, but need to go check some log 
	files, I'll use the shell built-in pushd command to save my current 
	directory location and popd to get back to the directory later.
	These aliases simplify the process by entering + before 
	changing directories, and _ to return to the directory 
	later. You can push more than one directory on to the stack and pop 
	them back off in reverse order. Note that I used the underscore instead 
	of the minus sign for popd because the minus sign is a reserved symbol.
	Find disk space abusers 
	alias dusk='du -s -k -c * | sort -rn' 
	... ... ...
	
		Show all programs connected or listening on a network port
		alias nsl='netstat -alnp --protocol=inet | grep -v CLOSE_WAIT 
		| cut -c-6,21-94 | tail +2' 
		... ... ...
		Quickly find packages in the RPM database 
 
alias rpmq='rpm -qa | grep $1'
 
	
					
					In tcsh, this can be done straightforwardly 
					using !:1  for the first argument, !:2  
					for the second, and so on. Remember, you'll need to 
					escape the !  in the alias definition.
					So for my LDAP search:
					
						
							
							alias finduser 'ldapsearch "(localUser=!:1)"' 
							 | 
						
					
					Then the following:
					
					Unfortunately, in bash/sh/ksh  
					this is no good, as you can't put arguments in aliases. 
					What you can do to produce the same effect is write 
					a function. 
					
						
							
							function finduser() { ldapsearch "(localUser=$1)"; }
							 | 
						
					
					(Note the ;  at the end of the command.)
					
	alias cls=clear
 
alias hist=history
alias !='history | tail -15'
 
alias l='ls -alF'
alias ll='ls -alF'
alias dir='ls -la'
alias la='ls -Fa'
 
alias md='mkdir -p'
alias rd=rmdir
alias ..='cd ..'
alias ...='cd ../..'
alias +='pushd .' 
	Eugene Lee
	
	list-themacintoshguy at fsck.net 
	Thu Feb 19 04:47:35 PST 2004 
	
	
	On Thu, Feb 19, 2004 at 01:28:32PM +0100, Kirk McElhearn wrote:
: 
: The following command replaces Mac line breaks with Unix line breaks:
: 
: perl -pi -e 's/\r\n?/\n/g'
: 
: I'd like to make an alias in bash, something like:
: 
: alias rplc='perl -pi -e 's/\r\n?/\n/g''
: 
: But the above doesn't work. I assume it has something to do with quoting.
: I've tried double-quotes, escaping the quotes in the perl string and more.
: 
: Can anyone tell me how this needs to be quoted to work correctly?
This worked for me at the command line:
	$ alias rplc="perl -pi -e 's/\r\n?/\n/g'"
Once the alias was created, this is how /bin/bash stored it:
	$ alias
	alias rplc='perl -pi -e '\''s/\r\n?/\n/g'\'''
However, you can use the rules of quoting to create an alias that is
easier to type and easier to read:
	$ alias rplc='perl -pi -e "s/\r\n?/\n/g"'
-- 
Eugene Lee
http://www.coxar.pwp.blueyonder.co.uk/
	
		
		
			
				| 
				I'm not much 
				into 
				aliases, but here is what I got: 
				 alias L='ls 
				-FLb'  
				alias LL='ls -FLlb'  
				alias a='alias'  
				alias h='history'  
				alias j='jobs -l'  
				alias l='ls -Fb'  
				alias la='ls -Flab'  
				alias ll='ls -Flb'  
				alias m='less'  
				alias ot='popd'  
				alias to='pushd'  
				alias zm='zless'  
				Basically 
				a bunch of ls shorthands (short listing, long listing, long 
				with hidden files, short and long following symlinks).
				 
				 | 
			 
		 
		 | 
	
	
		alias cp="cp -ia"
alias mv="mv -i"
alias rm="rm -i"
alias ls="ls --color=auto -h"
alias lss="ls --color=auto -hA"
alias l="ls --color=auto -hl"
alias cd..="cd .."
alias df="df -hT"
alias emerge="emerge -v"
alias unmerge="emerge unmerge"
alias untbz2="tar -xjvf"
alias untgz="tar -xzvf"
alias unbz2="bunzip2 -k"
alias grepi="grep --color=auto -Hirn"
alias psf="ps -ef"
alias psx="ps aux"
alias killwine="killall -9 wine; killall -9 wineserver"
alias netstati="netstat --verbose --tcp --udp --programs --extend"
alias mount_ro="mount -o ro,remount"
alias mount_rw="mount -o rw,remount"
alias clearswap="swapoff -a && swapon -a"
alias ka="killall -9"
alias free="free -m"
alias synctime="rdate -s ntp0.cornell.edu"
alias df="df -h"
	
	
alias md=mkdir
alias rd=rmdir
alias su-='sudo su -'
# inventions
alias ghist='history | grep '
alias lf='find -type f | sort '
alias load='cat /proc/loadavg '
alias meminfo='cat /proc/meminfo '
	
# logs
alias mylogs='sudo tail -f /var/log/{apache2/*log,squid/access.log,otrs.log,exim*log,messages}'
alias mylogs2='sudo tail -f /var/log/{syslog,daemon.log,user.log,router.log}'
# OTRS
alias vio='vi /opt/otrs/Kernel/{Config/Defaults.pm,Config.pm}'
# Kalendar
alias kal='clear;echo -n "Heutiges Datum: ";date;echo;cal -3m'
# switch off
alias s &>/dev/null && unalias s
alias p &>/dev/null && unalias p
Files, Users, and Shell Customization
	Shell Aliases
	An alias is a short form of a command. The 
	built-in alias command creates simple 
	abbreviations for the current Bash session.
	To create an alias, use the alias 
	command to assign a command and its switches a name.
	$ alias lf='ls -qFl'
$ lf
-rw-r-----  1 kburtch  devgroup   10809 Apr 6 11:00 assets.txt
-rw-r-----  1 kburtch  devgroup   4713 Mar 9 2000 mailing_list.txt
	Typing the alias command by itself, or with the -p switch, lists 
	the current aliases.
	$ alias
alias lf='ls -qFl'
	Bash interprets an alias only once, allowing the aliasing of a command 
	with its own name.
	$ alias ls='ls -qF' # Bash isn't confused
	Normally, only the first word of a command is checked for an alias. 
	As a special exception, if the last character in the alias string is 
	a blank, Bash checks the next word in the command to see whether it 
	is also an alias.
	There is no method for giving arguments to an alias. If arguments 
	are needed, define a more powerful shell function instead.
	The built-in unalias 
	command removes an alias. Use the -a switch to 
	remove them all.
	Most Linux distributions have aliases defined for 
	common commands. dir, for example, is often an 
	alias for ls. Some distributions define an alias 
	for commands such as rm -i to force user prompting, 
	which is not required by default. This can be a problem for some users 
	such as experienced Unix programmers who are used to working with these 
	features disabled. Use unalias to remove any 
	aliases that you don't want to use.
	Aliases mixed with shell functions can be confusing 
	because aliases are expanded only when a line from a script is read. 
	If aliases are used in a shell function, they are expanded when the 
	shell function is defined, not when it is executed. For this reason, 
	it is safer to avoid aliases altogether in shell scripts. However, they 
	can be turned on in scripts using the shopt –s expand_aliases 
	command.
	The shell maintains a list of aliases that 
	may be set and unset with the alias and
	unalias builtin commands. 
	
	The first word of each command, if unquoted, is checked 
	to see if it has an alias. If so, that word is replaced by the text 
	of the alias. The alias name and the replacement text may contain any 
	valid shell input, including shell metacharacters, with the exception 
	that the alias name may not contain =. The 
	first word of the replacement text is tested for aliases, but a word 
	that is identical to an alias being expanded is not expanded a second 
	time. This means that one may alias ls to
	"ls -F", for instance, and Bash does not 
	try to recursively expand the replacement text. If the last character 
	of the alias value is a space or tab character, then the next command 
	word following the alias is also checked for alias expansion. 
	
	Aliases are created and listed with the 
	alias command, and removed with the 
	unalias command. 
	There is no mechanism for using arguments in the replacement 
	text, as in csh. If arguments are needed, 
	a shell function should be used (see section
	
	Shell Functions). 
	Aliases are not expanded when the shell is not interactive, 
	unless the expand_aliases shell option is 
	set using shopt (see section
	
	Bash Builtin Commands). 
	The rules concerning the definition and use of aliases 
	are somewhat confusing. Bash always reads at least one complete line 
	of input before executing any of the commands on that line. Aliases 
	are expanded when a command is read, not when it is executed. Therefore, 
	an alias definition appearing on the same line as another command does 
	not take effect until the next line of input is read. The commands following 
	the alias definition on that line are not affected by the new alias. 
	This behavior is also an issue when functions are executed. Aliases 
	are expanded when the function definition is read, not when the function 
	is executed, because a function definition is itself a compound command. 
	As a consequence, aliases defined in a function are not available until 
	after that function is executed. To be safe, always put alias definitions 
	on a separate line, and do not use alias 
	in compound commands. 
	Note that for almost every purpose, aliases are superseded by shell 
	functions. 
 
Softpanorama Recommended
Advanced Bash-Scripting Guide - Chapter 24. Aliases
How do I create a permanent Bash alias - Ask 
Ubuntu
alias Man Page - Linux - SS64.com
Society
Groupthink :
Two Party System 
as Polyarchy : 
Corruption of Regulators :
Bureaucracies :
Understanding Micromanagers 
and Control Freaks : Toxic Managers :  
Harvard Mafia :
Diplomatic Communication 
: Surviving a Bad Performance 
Review : Insufficient Retirement Funds as 
Immanent Problem of Neoliberal Regime : PseudoScience :
Who Rules America :
Neoliberalism
 : The Iron 
Law of Oligarchy : 
Libertarian Philosophy
Quotes
 
War and Peace 
: Skeptical 
Finance : John 
Kenneth Galbraith :Talleyrand :
Oscar Wilde :
Otto Von Bismarck :
Keynes :
George Carlin :
Skeptics :
Propaganda  : SE 
quotes : Language Design and Programming Quotes :
Random IT-related quotes : 
Somerset Maugham :
Marcus Aurelius :
Kurt Vonnegut :
Eric Hoffer :
Winston Churchill :
Napoleon Bonaparte :
Ambrose Bierce : 
Bernard Shaw : 
Mark Twain Quotes
Bulletin:
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient 
markets hypothesis :
Political Skeptic Bulletin, 2013 :
Unemployment Bulletin, 2010 :
 Vol 23, No.10 
(October, 2011) An observation about corporate security departments :
Slightly Skeptical Euromaydan Chronicles, June 2014 :
Greenspan legacy bulletin, 2008 :
Vol 25, No.10 (October, 2013) Cryptolocker Trojan 
(Win32/Crilock.A) :
Vol 25, No.08 (August, 2013) Cloud providers 
as intelligence collection hubs : 
Financial Humor Bulletin, 2010 :
Inequality Bulletin, 2009 :
Financial Humor Bulletin, 2008 :
Copyleft Problems 
Bulletin, 2004 :
Financial Humor Bulletin, 2011 :
Energy Bulletin, 2010 : 
Malware Protection Bulletin, 2010 : Vol 26, 
No.1 (January, 2013) Object-Oriented Cult :
Political Skeptic Bulletin, 2011 :
Vol 23, No.11 (November, 2011) Softpanorama classification 
of sysadmin horror stories : Vol 25, No.05 
(May, 2013) Corporate bullshit as a communication method  : 
Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
History:
Fifty glorious years (1950-2000): 
the triumph of the US computer engineering :
Donald Knuth : TAoCP 
and its Influence of Computer Science : Richard Stallman 
: Linus Torvalds  :
Larry Wall  :
John K. Ousterhout : 
CTSS : Multix OS Unix 
History : Unix shell history :
VI editor :
History of pipes concept :
Solaris : MS DOS 
:  Programming Languages History :
PL/1 : Simula 67 :
C :
History of GCC development : 
Scripting Languages :
Perl history   :
OS History : Mail :
DNS : SSH 
: CPU Instruction Sets :
SPARC systems 1987-2006 :
Norton Commander :
Norton Utilities :
Norton Ghost :
Frontpage history :
Malware Defense History :
GNU Screen : 
OSS early history
Classic books:
The Peter 
Principle : Parkinson 
Law : 1984 :
The Mythical Man-Month : 
How to Solve It by George Polya :
The Art of Computer Programming :
The Elements of Programming Style :
The Unix Hater’s Handbook :
The Jargon file :
The True Believer :
Programming Pearls :
The Good Soldier Svejk : 
The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society :
Ten Commandments 
of the IT Slackers Society : Computer Humor Collection 
: BSD Logo Story :
The Cuckoo's Egg :
IT Slang : C++ Humor 
: ARE YOU A BBS ADDICT? :
The Perl Purity Test :
Object oriented programmers of all nations 
: Financial Humor :
Financial Humor Bulletin, 
2008 : Financial 
Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related 
Humor : Programming Language Humor :
Goldman Sachs related humor :
Greenspan humor : C Humor :
Scripting Humor :
Real Programmers Humor :
Web Humor : GPL-related Humor 
: OFM Humor :
Politically Incorrect Humor :
IDS Humor : 
"Linux Sucks" Humor : Russian 
Musical Humor : Best Russian Programmer 
Humor : Microsoft plans to buy Catholic Church 
: Richard Stallman Related Humor :
Admin Humor : Perl-related 
Humor : Linus Torvalds Related 
humor : PseudoScience Related Humor :
Networking Humor :
Shell Humor :
Financial Humor Bulletin, 
2011 : Financial 
Humor Bulletin, 2012 :
Financial Humor Bulletin, 
2013 : Java Humor : Software 
Engineering Humor : Sun Solaris Related Humor :
Education Humor : IBM 
Humor : Assembler-related Humor :
VIM Humor : Computer 
Viruses Humor : Bright tomorrow is rescheduled 
to a day after tomorrow : Classic Computer 
Humor 
The Last but not Least  Technology is dominated by 
two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. 
Ph.D
Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org 
was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) 
without any remuneration. This document is an industrial compilation designed and created exclusively 
for educational use and is distributed under the Softpanorama Content License. 
Original materials copyright belong 
to respective owners. Quotes are made for educational purposes only 
in compliance with the fair use doctrine.  
FAIR USE NOTICE This site contains 
		copyrighted material the use of which has not always been specifically 
		authorized by the copyright owner. We are making such material available 
		to advance understanding of computer science, IT technology, economic, scientific, and social  
		issues. We believe this constitutes a 'fair use' of any such 
		copyrighted material as provided by section 107 of the US Copyright Law according to which 
such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) 
site written by people for whom English is not a native language. Grammar and spelling errors should 
be expected. The site contain some broken links as it develops like a living tree...
Disclaimer: 
The statements, views and opinions presented on this web page are those of the author (or 
referenced source) and are 
not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness 
of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be 
tracked by Google please disable Javascript for this site. This site is perfectly usable without 
Javascript. 
Last modified:
March 12, 2019
 
.bashrcwith multiple instances ofaliascommand. Your function definitely needs to implement some checkups to avoid such cluttering. – Troublemaker-DV Mar 31 '16 at 1:04