如何在没有任何用户配置的情况下启动Shell? [英] How to start a shell without any user configuration?

查看:68
本文介绍了如何在没有任何用户配置的情况下启动Shell?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Linux/OSX终端下使用干净的" shell(例如bash),而无需任何用户配置,但是它每次启动时都会从某些文件(例如〜/.bashrc)中读取配置信息.每当我需要一个干净"的外壳时,我都可以修改该文件,并在完成后将其还原,但是有没有更简单的方法来做到这一点,例如命令?

I need to use a "clean" shell (e.g. bash) under Linux/OSX terminal without any user configuration, but it reads config info from some files (e.g ~/.bashrc) every time it starts. I can modify the file every time I need a "clean" shell, and revert it back when I finished, but is there any easier ways to do this, for example a command?

推荐答案

您可以传递--noprofile--norc命令行选项:

You can pass the --noprofile and --norc command-line options:

$ bash --noprofile --norc

您可以在手册页中找到有关这些选项的文档.

You will find documentation about these options in the man page.

这篇关于如何在没有任何用户配置的情况下启动Shell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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