Step by Step Guide to Installing Sudo in Termux Without Root

Termux is an android terminal emulator and Linux environment app that work directly with no rooting or setup required. It can do many things on Android devices that are not possible without rooting or complex setup. In this guide, we will be showing you how to install and use the root-capable Sudo in Termux without rooting your device.

Pre-Requisites

Before getting started, you will need to have Termux installed on your Android device. If you do not have it installed, you can download it from the Google Play Store here.

Installing Sudo

  1. Open the Termux app and type the following command to update the repository package lists and upgrade installed packages:
apt update && apt upgrade
  1. Let the process run until it is completed, then type the following command to install Sudo.
pkg install sudo 
  1. Allow the installation process to run until it is completed
  2. After the installation is complete, Sudo is ready to use.

Using Sudo in Termux

Once you have successfully installed Sudo, you can use it just as you would in a Linux environment. For example, to add a user to the sudo group, you would type the following command:

sudo usermod -a -G sudo <username>

FAQ

Q1: What is Root Access?

Root access is the access level on Linux-based operating systems that gives the user full control over all files, commands, and settings. Root access is granted to users with the use of password authentication.


Q2: Does installing Sudo in Termux require root?

No, installing Sudo in Termux does not require you to root your device. You can simply install it using the pkg command in Termux.


Q3: You did not explain the “sudo” command, why?

The ‘sudo’ command is used to provide extra privileges to other normal users. With ‘sudo’, users can execute commands that are normally restricted to administrator/root access. Sudo is used in Unix and Linux based systems, including Termux.


Q4: What is the difference between root and sudo users?

Root users have access to all files, while ‘sudo’ users have the ability to run commands with the same privileges as the root user. However, sudo users can only run certain specific commands and not all commands as root users.


Q5: Is it possible to switch an already existing user to sudo in termux?

Yes, it is possible to switch an already existing user to sudo in Termux. To do this, you would need to use the ‘sudo usermod’ command with the -a (add) and -G (group) options, followed by the name of the user. For example:

sudo usermod -a -G sudo <username>

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Lxadm.com.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.