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?
相关问题
- How to get the return code of a shell script in lu
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- JQ: Select when attribute value exists in a bash a
- Invoking Mirth Connect CLI with Powershell script
Running
bash --noprofile --norc
still inherited from parent process. Based on a similar question I found that the way I interpreted this questionenv -i bash --norc --noprofile
was what I would want.You can pass the
--noprofile
and--norc
command-line options:You will find documentation about these options in the man page.
Use --noprofile --norc:
(from the manpage).