How to change the default startup folder in Termux?
Asked Answered
A

1

6

Currently I've been using the Termux terminal on Android Samsung phone. So basicly every time i want to go to my Dropbox folder via terminal i need to cd into the "home/storage/shared/Android/data/com.dropbox.android/files/ u1407419/scratch/org " directory, which is not very time effective. Is there a way to change the default Termux folder, so that each time Termux is opened it automaticly jumps to the folder mentioned ? Thanks

Activism answered 3/3, 2019 at 15:59 Comment(0)
G
15

Instead of changing the default Termux folder which is quite a hectic and unworthy process, a quick workaround would be that you try this:

  1. Edit the bash.bashrc file located here /data/data/com.termux/files/usr/etc/bash.bashrc using nano or any other text editor...

    → Command : nano /data/data/com.termux/files/usr/etc/bash.bashrc

  2. And append this line to the end of the file...

→Append : cd ~/storage/shared/Android/data/com.dropbox.android/files/ u1407419/scratch/org

  1. Restart your terminal and you will find that it always opens up in your desired directory!
Goldston answered 12/3, 2019 at 16:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.