linuxmacosbashshell

How to start a shell without any user configuration?


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?


Solution

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

    $ bash --noprofile --norc
    

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