How to Open New Terminals in Sub-Directories

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. 1.
    While in the Creator, select the Interface tab:
  2. 2.
    Then, scroll to the Terminal Tabs settings:
    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. 1.
    Go to the Settings tab:
  2. 2.
    Navigate to the Startup Script setting and enter 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.