sudo apt-get update ，
sudo apt-get install packagename. 有一个终端可以在android上执行命令吗？它不一定是"sudo" ，我只是意味着履行命令。我使用Galaxy S3，但我怀疑我要问的问题真的很重要。
I use KUBUNTU on my laptop, but this goes for any Linux distro. I can open a terminal window and type in things like
sudo apt-get update,
sudo apt-get install packagename. Is there a terminal that can carry out commands like this on Android? It doesn't have to be "sudo", I simply mean carrying out commands. I use the Galaxy S3, but I doubt it really matter for the question I'm asking.
Summing up from the comments:
First you need to understand that updating apps works different on Android than it does on a "normal" Linux distro: There is no such thing as "apt". Though Android has its own package manager (listening to the
pm command), installs/updates are usually dealt with by services/apps like google-play-store or other alternative-markets.
pm would rather be comparable with dpkg on Debian-based systems: it can do local installs (i.e. with the
.apk file already present on the device itself:
pm install would be the command for that), and a lot of other things.
Apart from that: a terminal app can be compared with a terminal on Linux allright. You get a text-mode "window" where you can execute commands. Most are even similar to those available on Linux, as Android is Linux based: you have things like
grep, and more. For details on this, you might wish to take a look at e.g.
A look into our terminal tag-wiki will not hurt either :)
I'd say all terminal apps available for Android should support the above. Some even offer additional features, such as an entire development environment (Terminal IDE), or access to remote servers (JuiceSSH).
There is a terminal app which uses "apt" to install packages. Its awesome and has lots of packages ported for arm devices -- Termux & Playstore Link
in present days there is the app "termux" on google play store. it comes with a full unix/linux shell and with apt. anything else should be straight forward then. downside: it does not support items like my Android 4.4.2 based tablet.
Install Terminal Emulator and Busybox in your Android. Terminal Emulator gives command-line window and Busybox APK gives useful commands that are used in Linux like
chroot and more.
subinary is located at
If all the 4 conditions above are satisfied, then:
If you want to enter the shell and become root (superuser uid 0) so you can execute commands without uid restrictions, start the Terminal Emulator app and just execute this command:
In order to disconnect from the uid 0 (exit superuser status), press Volume - and D, or type
exit and hit Enter
Alternatively, if you want to always start Terminal Emulator as root, then start Terminal Emulator, go to Preferences, scroll down to the SHELL section, tap the Command line option and modify the command so it becomes this:
/system/xbin/su -c "/system/bin/sh -"
After you change the command, exit Terminal Emulator (close the application) and start it again. Notice how Terminal Emulator's shell interface now shows you
root@something by default.
If you want to add extra commands to your rooted Android system, install BusyBox.
In case your Android device isn't rooted, you still can use Terminal Emulator in order to execute some basic (user) commands such as
uptime et cetera.
Or you can use Gnu/Root Debian for android (GPlay)