Mac: Alias[设置命令的别名]
2017-04-11 09:21
441 查看
转自:http://www.cnblogs.com/ihojin/p/mac-align.html
设置
1.打开终端
2.输入命令
3.生成一个新文件
4.使用喜欢的方式编辑
5.更新内建命令
向
http://witcheryne.iteye.com/blog/1683484
http://baike.baidu.com/subview/49616/5092575.htm?fr=aladdin
设置.bash_profile
1.打开终端Terminal
2.输入命令
cd ~到用户主目录
$ cd ~
3.生成一个新文件
$ touch .bash_profile
4.使用喜欢的方式编辑
.bash_profile文件,也可以使用
-e参数,使用
TextEdit打开文件
$ open -e .bash_profile
5.更新内建命令
$ source .bash_profile
向.bash_profile
中增加命令别名
alias restart_network=/Users/mac/.command/RestartNetwork.sh
重启网络
#!/bin/sh sudo ifconfig en0 down sudo ifconfig en0 up //RestartNetwork.sh 中的内容
参考:
http://blog.marslightstudio.com/?p=122http://witcheryne.iteye.com/blog/1683484
http://baike.baidu.com/subview/49616/5092575.htm?fr=aladdin
相关文章推荐
- Mac: Alias[设置命令的别名]
- Mac终端给命令设置别名alias的办法
- Mac: Alias[设置命令的别名]
- 命令别名alias设置
- 【每天一个Linux命令】18. 设置指令别名命令alias
- 命令别名的设置——alias
- alias 给你的linux命令设置别名
- Linux命令alias - 设置命令的别名,让 Linux
- Mac 系统中alias别名设置
- 使用mac 终端利用alias设置快捷命令
- Mac下配置alias,zsh终端命令别名
- alias 为命令设置别名
- Ubuntu中使用alias设置命令别名
- Mac 系统中alias别名设置
- ls ,tree,用法简单命令;alias别名用法(临时设置和永久设置)
- linux/mac下的自定义命令alias,并保存别名使其永久生效(重启不会失效)
- unalias命令_Linux unalias 命令用法详解:删除由alias设置的别名
- alias指令:设置命令别名
- Linux下使用alias设置命令别名