On your Mac, do one of the following: Select the item, then choose File Make Alias. You can create as many aliases for an item as you want, then drag them to other folders or to the desktop. Press Option-Command while you drag the original item to another folder. Alias safari= ' open -a safari ' alias firefox= ' open -a firefox ' alias opera= ' open -a opera ' alias chrome= ' open -a google chrome ' alias canary= ' open -a. Now add your alias in this file one per line, example: alias hello=ls alias allfiles='ls -a ltrh' ️ Note that if there is a space in the the command, you should surround it with single quotes. There should be no space between the alias name and equals sign and its value. Now press Command + X to quite nano and click Y to save the file.
To set an alias, we must edit the alias file. If you’re using RHEL your alias file is located in ~/.aliases. If you’re using a Debian system your alias file is located in ~/.bash_aliases by default. It is important to note that ~/. signifies the user's home directory.
For example, the full path of the alias file on a Debian system would be: /home/USER/.bash_aliases
vi ~/.aliasesFor RHEL
Or
vi ~/.bash_aliasessFor Debian systems
Creating an alias results in the following:
alias name=’command’
![Google Chrome Alias Mac Google Chrome Alias Mac](/uploads/1/3/4/8/134857681/485367457.png)
For example, if we wanted to create an alias called browser that launched Google Chrome, we would add the following alias to the alias file:
alias browser=’google-chrome’
Then source the alias file after saving the new addition in order to use it:
source ~/.aliases
Or
source ~/.bash_aliases
When we type the alias browser into our terminal it will then launch the Google Chrome browser.
To list available aliases enter:
![Alias mac os Alias mac os](/uploads/1/3/4/8/134857681/731203413.png)
alias
Here are some aliases that may be helpful:
Google Chrome Alias Mac Os
alias weather='curl wttr.in'
alias afs =’ssh [email protected]’
Google Chrome For Mac Mini
alias reboot=’sudo reboot’
Retrieved from 'https://wiki.linux.njit.edu/index.php?title=CreateAliases&oldid=86'