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?
Interactive Login Shell The shell is invoked after a user successfully login into the system, using /bin/login, after reading credentials stored in the /etc/passwd file. When the shell is started as an interactive login shell, it reads the /etc/profile and its user-specific equivalent ~/. bash_profile.
Press Windows key + X then click Command prompt, at the command prompt, type: bash then hit Enter. If you want to be able to access the local file system, press Windows key + X, Command Prompt (Admin) then type bash at the prompt.
Running bash --noprofile --norc
still inherited from parent process. Based on a similar question I found that the way I interpreted this question env -i bash --norc --noprofile
was what I would want.
You can pass the --noprofile
and --norc
command-line options:
$ bash --noprofile --norc
You will find documentation about these options in the man page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With