mac上使用alias配置终端命令的别名?

默认分类 未结 1 1277
______Stacey
______Stacey 2023-03-21 09:27
相关标签:
1条回答
  • 2023-03-21 10:19

    设置.bash_profile1.打开终端Terminal 2.输入命令cd ~到用户主目录$ cd ~13.生成一个新文件$ touch .bash_profile14.使用喜欢的方式编辑.bash_profile文件,也可以使用-e参数,使用TextEdit打开文件$ open -e .bash_profile15.更新内建命令$ source .bash_profile 1向.bash_profile中增加命令别名alias restart_network=/Users/mac/.command/***.sh1重启网络#!/bin/shsudo ifconfig en0 downsudo ifconfig en0 up//***.sh 中的内容

    0 讨论(0)
提交回复