如果.bash_profile不存在,如何设置.我想从Mac的命令行启动Sublime [英] How to set .bash_profile, if it does not exist yet. I want to launch sublime from a command line in Mac

查看:643
本文介绍了如果.bash_profile不存在,如何设置.我想从Mac的命令行启动Sublime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用subl filename从Mac的命令行启动sublime.它似乎涉及处理.bash_profile.但是我没有找到文件.应该采取什么步骤?

I want to launch sublime from a command line in Mac, using subl filename. It seems to involve dealing with .bash_profile. But I didn't locate the file. What steps to be taken?

推荐答案

典型的OS X安装不会为您创建.bash_profile.当您想从命令行运行函数时,这是必须具备的.

A typical install of OS X won't create a .bash_profile for you. When you want to run functions from your command line, this is a must-have.

  1. 启动终端
  2. 键入cd ~/转到主文件夹
  3. 键入touch .bash_profile创建新文件.
  4. 使用您喜欢的编辑器编辑.bash_profile(或者您只需键入open -e .bash_profile即可在TextEdit中打开它.
  5. 键入. .bash_profile以重新加载.bash_profile并更新您添加的所有功能.注意两个点之间的间隔!
  1. Start up Terminal
  2. Type cd ~/ to go to your home folder
  3. Type touch .bash_profile to create your new file.
  4. Edit .bash_profile with your favorite editor (or you can just type open -e .bash_profile to open it in TextEdit.
  5. Type . .bash_profile to reload .bash_profile and update any functions you add. Notice the space between the two dots!

这篇关于如果.bash_profile不存在,如何设置.我想从Mac的命令行启动Sublime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆