User Tools

Site Tools


bash:aliases:local_vs_global

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
bash:aliases:local_vs_global [2020/05/05 20:01] peterbash:aliases:local_vs_global [2020/05/05 20:21] (current) – removed peter
Line 1: Line 1:
-====== BASH - Aliases - Local vs Global ====== 
- 
-Aliases can be global, i.e. apply by default to every user on the system. 
- 
-However each user can also have their own aliases which only apply to them. 
- 
----- 
- 
-===== Global Aliases ===== 
- 
----- 
- 
-===== Local Aliases ===== 
- 
-Local aliases are specific to the user. 
- 
-These aliases should be defined in a file named **.bash_aliases** user's home directory. 
- 
-<file bash ~/.bash_aliases> 
-alias apt='sudo apt-get' 
-alias update='sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoremove && sudo apt-get autoclean' 
-</file> 
- 
----- 
- 
- 
-To apply the changes immediately to your bash profile without having to log out, simply run this: 
- 
-<code bash> 
-. ~/.bashrc 
-</code> 
- 
-or 
- 
-<code bash> 
-. ~/.bash_profile 
-</code> 
- 
  
bash/aliases/local_vs_global.1588708915.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki