Linux Terminal — Flutter APP

Charan Vaddepally
3 min readAug 23, 2021

I have been learning Mobile App Development with the help of Flutter and I already knew some stuff about Linux and Docker.

So I thought why not make a Mobile APP that can run linux commands remotely from a mobile itself. Isn’t this a good idea?

Let’s get into and see how we did it.

Step 1: Setup the backend

— I used a Linux VM setup in my local network and configured docker in it. Note down the IP of your Linux VM

— Now configure the webserver(I used Apache HTTPD) and write a backend cgi code that can handle apis, following is an example for it and note down the port no.

We will need the IP:PORT to call it as an API from the Flutter APP(So don’t forget to note down the IP and PORT(of webserver) of the Linux VM

Now I have written the Dart Code for the main mobile app, and build it using Flutter and installed it in a Mobile App(NOTE: The mobile phone and the Linux VM are on the same network so that we can connect provided the private IP of VM, We can later change the Linux VM to be on Cloud so that we can access the api from any network)

The Flutter code can be found here: https://github.com/Charan2k/Linux-App

Now following are the Screenshots of the App where I ran different-different Linux Commands

Now soon as I type the command and press enter, The API will be called and the output will be shown in the below container.

Check the Next Image for Output

OUTPUT SS:

That’s it for this time. Thank you for reading.

--

--