How to open Termux from external app.


Sometimes we need to work on a deep directory. Now the problem comes when we need to go to that directory. Suppose, that our working directory is " ~/myProject/old/2022/6/24/website/src" like this. Now, if I want to go to that directory I need to type every directory name one by one. But it is so lengthy and time-consuming.


If you are a Linux user then you know that, in Linux, we can open any specific directory in the terminal from the file explorer. What if we can do the same thing on Termux? Is it possible? Yes, it's possible. in this article, I will show you how to do this on Termux.

Before Beguan, We need a file explorer application called Mixplorer. Though it is a premium application on the play store but it has also a free version available on the internet. Don't worry, it's not cracked or harmful. You can easily download it from F-Doid. We also need Vim editor.  It's a text editor for the terminal. I already have a post about Vim you can read that also.

First,  open the Termux application and execute this command.

vim .termux/termux.properties

The above command will open Termux properties. On that properties, we need to uncomment this line by removing the # sign.

# allow-external-apps = true


Navigate to the line by simply pressing the arrow key provided by Termux. Now Pres "i" to go to the insert mode and delete the # sign. Press the ESC key on Termux to go to the command mode and type :wq to save and quit the editor.

And now on, we can directly open any directory without writing the directory path. Before we do that, we need to setup storage on Termux by executing this command.

termux-setup-storage


Also Read: 

Opening directory directly

First open Mixplorer, if you don't have it then download it. After open Mixplorer goes to your directory which one you want to open in Termux.

Click the three-dot menu from the top right corner. Then click the "Open in terminal" option. And click on Termux App.




Boom! The directory successfully opened in Termux without the need to manually type out the entire path.

Note: don't change Open in terminal command. Keep it like this.


cd $workdir

Conclusion

In this article, I showed how to open deep directory in Termux like how we do on linux. This can save your time and upgrade your productivity.  I hope the article help you. If yiu have any problem, feel free to comment. Thank you for read this article.

Istiak Ahmmed Soyeb

I'm Soyeb, Now I'm a web designer. I chose my career as a web developer. I'm also a Blogger (Not Professional). And I love technology very much.

Post a Comment

Previous Post Next Post