How Do I Change the Default Directory in Ubuntu Terminal?
Contents

How do I change the default directory in Ubuntu?

In order to change default directory

  1. Open .bashrc file in your text editor by entering the command: gedit .bashrc.
  2. Edit this file by adding your command in last, like: cd ~/YourDirectoryName.
  3. Save the file and restart the terminal.

How do I change the default working directory in Linux terminal?

How to change directory in Linux terminal

  1. To return to the home directory immediately, use cd ~ OR cd.
  2. To change into the root directory of Linux file system, use cd / .
  3. To go into the root user directory, run cd /root/ as root user.
  4. To navigate up one directory level up, use cd ..
  5. To go back to the previous directory, use cd –

9 февр. 2021 г.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest