编辑 ~/.zshrc 文件 [英] Editing the ~/.zshrc file

查看:79
本文介绍了编辑 ~/.zshrc 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个完全的新手,所以我想我只是错过了一步,但不知道.

I'm a complete newbie, so I think I'm just missing a step, but have no idea.

我正在学习 Rails 教程.很多步骤都说,然后编辑 ~/.zshrc 文件."但我没有任何 ~/.zshrc 文件.我正在查看 Sublime 中的文件夹.此外,以下 ~/.zprofile、~/.zlogin、~/.zlogout 都不存在.不过,在我的主文件下,有 .zprezto 文件夹.也没有 zshenv...

I'm following tutorials for Rails. Lots of steps say, "and then editing the ~/.zshrc file." but I don't have any ~/.zshrc file. I'm looking at the folders in Sublime. Also none of the following ~/.zprofile, ~/.zlogin, ~/.zlogout exist. Though, under my home files, there is .zprezto folder. No zshenv either...

我只是创建文件吗?似乎它们应该从某个地方下载.我在 OS X 上使用终端.所以迷路了.

Do I just create the files? Seems like they should be downloaded from somewhere. I'm using Terminal with OS X. So lost.

echo 'write whatever' >.zshrc

提前致谢!

推荐答案

只有在 Mac OS 上使用 zsh shell 时,您才会获得 ~/.zshrc 文件.如果您不确定您使用的是哪个 shell,请打开终端并发出以下命令.

You will get ~/.zshrc file only when you use zsh shell on your Mac OS. If you're not sure which shell you're using, open terminal and issue the following command.

echo $SHELL

如果您收到类似 /bin/zsh 的响应,那么您正在 Mac 上使用 zsh shell.您可以在 Mac 上使用 vim 编辑器编辑 ~/.zshrc 文件,这是 Mac OS 的默认设置.

if you get response like /bin/zsh then you're using zsh shell on your Mac. You can edit ~/.zshrc file using vim editor on your Mac which is the default for Mac OS.

要使用 vim 编辑器打开 ~/.zshrc 文件,请在终端上发出以下命令.

to open ~/.zshrc file using vim editor, issue the following command on your terminal.

vim ~/.zshrc

然后您可以进行任何您需要的配置.或者,您可以使用 open -t .zshrc 命令从 Mac OS 上的常规 TextEdit 打开 ~/.zshrc 文件.

Then you can do any configurations you need. Or else you can use open -t .zshrc command to open ~/.zshrc file from your general TextEdit on Mac OS.

这篇关于编辑 ~/.zshrc 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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