How To Open New Terminals in Sub-directories

How to open new terminals in directories other than /home/nt-user/workspace.

Using Terminal Settings

Sometimes you may want terminals to default to a particular directory within a project, and not /home/nt-user/workspace to prevent users from having to repetitively enter cd commands.

To accomplish this:

  1. While in the Creator, select the "Interface" tab:

The terminal's setting button is located in the lower, left corner

2. Then, scroll to the "Terminal Tabs" options:

The terminal's start command popup

Enter cd {{directory-path}} where {{directory-path}} is the path to the desired sub-directory. This will run for the first terminal that is open when the project starts and the cd /var/www/html will be visible in the terminal. This can be configured for each terminal in the creator, but new terminals will default to /home/nt-user/workspace . Read the next section on accomplishing this using a startup script to apply a this rule to new tabs created outside of the Creator.

Using a Startup Script

1. Go to the "Settings" tab:

Settings tab

2. Navigate to the "Startup Script" option and enter the following:

printf '\ncd {{directory-path}}\n' >> /home/nt-user/.bashrc

... where {{directory-path}} is the path to your directory (e.g., "/home/nt-user/workspace/hello-react").

New tabs will now open in the sub-directory of your choice.