Hey Guys, It's me SaadMaqsood 🙋🏻♂️, And while using termux I sometimes want to try the different flavors of OS, this was the reason I wrote a post on how you can Install and Run Kali Linux Shell in Termux🔥. Since we have tried Kali Linux on termux, we should also see how ubuntu feels in termux. Using different os in termux gives you a new enjoyment to work with so even if you mess up something, your termux will still be the same. So keep reading and I am going to tell you how you can easily install ubuntu in termux and use it to learn more about it.📱🔥
Termux Ubuntu: Benefits of Using Termux Ubuntu
Install Ubuntu Shell in Termux :
Step 1: (Update termux):
apt-get update && apt-get upgrade -y
This command will update all the preinstalled packages in termux.
Step 2: (Install wget proot and git):
apt-get install wget proot git -y
If you have decent internet, these packages will be installed in a few seconds.
Step 3: (Go to HOME folder in Termux):
cd
You just have to type "cd" and press enter and you will be in the /home folder of the termux.
Step 4: (Fetch the script from the github):
git clone https://github.com/MFDGaming/ubuntu-in-termux.git
Step 5: (Go to the script directory):
cd ubuntu-in-termux
Step 6: (Give execution permission to the script):
chmod +x ubuntu.sh
Step 7: (Execute the script):
./ubuntu.sh -y
Step 8: (start ubuntu shell):
./startubuntu.sh
So now what you will see is the ubuntu shell, but you won't see any difference other than the prompt. To make it look better, you need to customize the shell.
Run and Customize Ubuntu shell in Termux:
If you restart your termux and you want to run the ubuntu again you have to first change your working directory to the ubuntu-in-termux folder, and then you have to run the startubuntu.sh file. so you have to execute below two commands.
cd ubuntu-in-termux
./startubuntu.sh
This is a fine way to enter your ubuntu shell but that is not the only way.
Shortcut to Run Ubuntu shell in Termux:
To create a shortcut for ubuntu shell you can just paste the below command once in your termux terminal and after restarting whenever you will type "ubuntu" in your termux shell your Ubuntu shell will be started immediately. You can also edit the green part in the command to whatever alias you want.
echo "alias ubuntu='cd && cd ubuntu-in-termux && ./startubuntu.sh'" >> /data/data/com.termux/files/usr/etc/bash.bashrc
Install Neofetch in Ubuntu shell:
We all know that one of the most useful intro screen in termux is neofetch. And whenever I install any flavor of linux in my system I always first install neofetch in it to get the feel of the OS. To install anything in ubuntu you have to use apt-get command.
apt-get install neofetch
make sure you apt-get update and apt-get upgrade first so you don't face any issues.
If you want this Neofetch to always show up, whenever you open the ubuntu shell then paste the bellow command in ubuntu shell and restart it.
You can try installing new packages and customizing this one as much as you like.
Conclusion:
Termux Ubuntu shell is the best way to explore other types of linux distributions in just a few seconds of work. I personally love how you can have a virtual sort of terminal in a simulated terminal environment. Not everyone is a big fan of ubuntu so here is the same post but for kali linux [ Termux Kali Linux : Install and Run Kali Linux Shell in Termux ]. You can do whatever you want in the shell and if you mess up somewhere, try to fix it or just delete the repository and it will be gone with no errors in your termux. If you have any comments or suggestions then use the comment section. thanks for reading guys, and as always, Stay Ethical 👾.
0 Comments