When I press CtrlAltt, the terminal is open in $HOME dir.
I want to open it in /tmp
instead.
Thus:
- CtrlAltt
- Terminal is open at
/tmp
Is it possible?
How can I configure it?
When I press CtrlAltt, the terminal is open in $HOME dir.
I want to open it in /tmp
instead.
Thus:
/tmp
Is it possible?
How can I configure it?
By adding cd /tmp
to your .bashrc
, bash will go to /tmp
directly after you open a Terminal.
This will open a terminal at the /tmp directory.
$ mate-terminal --working-directory=/tmp/
.bashrc
may confuse some scripts. At a minimum,.bash_login
would be better. – chrylis -cautiouslyoptimistic- Aug 16 '20 at 01:25.bash_login
shouldn't be used for this. The shell in a graphical terminal application (Ctrl+Alt+T) in Ubuntu--and just about any GNU/Linux system--isn't a login shell so none of.profile
,.bash_profile
, or.bash_login
is sourced. Also, creating.bash_login
(or.bash_profile
) causes bash to source it instead of, rather than in addition to,.profile
, for login shells (as one gets when logging in on a virtual console or via SSH). On Ubuntu, the default contents of.profile
are substantial.cd /tmp
in.bashrc
is fairly safe if placed at the end. – Eliah Kagan Aug 16 '20 at 17:12