Set command alias command purpose alias is used to set command alias command syntax setting alias: alias [alias] [command name] Example: aliasrm & amp; 39; rm-I & amp; 39; clear alias: unalias [alias] All clear: unalias-a command instance [plain] setting command alias command purpose alias is used to set command alias command syntax setting alias: alias [alias] = [command name] example: alias rm = 'rm-I 'clear alias: unalias [alias] clear all: unalias-a command instance [plain] #1. to view the number of aliases currently set, enter alias bixiaopeng @ bixiaopengtekiMacBook-Pro ~ $ Alias cdxm = 'CD/Volumes/warehouse/source-xiami/xiamimusic 'alias grep = 'grep -- color = alway' #2. delete an alias bixiaopeng @ bixiaopengtekiMacBook-Pro ~ $ Unalias cdxm bixiaopeng @ bixiaopengtekiMacBook-Pro ~ $ Alias grep = 'grep -- color = alway'/#3. add an alias # Modify. bash_profile bixiaopeng @ bixiaopengtekiMacBook-Pro ~ $ Vim. bash_profile # add the following command to the File: alias cdxm = 'CD/Volumes/warehouse/source-xiami/xiamimusic '# save and make the command take effect immediately: bixiaopeng @ bixiaopengtekiMacBook-Pro ~ $ Source. bash_profile # verify the command bixiaopeng @ bixiaopengtekiMacBook-Pro ~ $ Cdxm bixiaopeng @ bixiaopengtekiMacBook-Pro xiamimusic $ pwd/Volumes/warehouse/source-xiami/xiamimusic
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.