-2

There are a lot of standard Linux commands that do not work from a Terminal Emulator in Android. I thought Android is based on the Linux kernel, but it lacks so many functions like man, groups, find, etc.

Why are there so many normal Linux commands that do not work?

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
yoyo_fun
  • 335
  • 2
  • 7
  • 4
    A kernel does not implement the binaries, as you should know. The latter are stored in /system/bin, /system/xbin or /sbin. – Grimoire Mar 27 '16 at 17:35
  • 1
    If you need additional commands, check for "Busybox". Though its installation usually requires root access, there's at least one that does not. – Izzy Mar 27 '16 at 17:47
  • This is similar to asking why applesauce does not have a crust, because apple pie and applesauce are both based on apples. – Matthew Read Mar 28 '16 at 03:27

1 Answers1

3

This is not Bash. At the beginning of my journey in Android, I have seen that the Android shell is a little bit different from Bash.

The Android Shell

A "shell" is a program that listens to keyboard input from a user and performs actions as directed by the user. Android devices come with a simple shell program. This shell program is mostly undocumented. Since many people are curious about it, I thought I'd write up some documentation for it.

Built-in Commands

Every shell has a few built-in commands. Some common built-in commands are:

  • echo -- prints text to stdout
  • set -- sets shell variables
  • export -- makes shell variables available to command-line programs
  • cd -- change the current directory
  • pwd -- print name of the current directory

Futher Reading

Please check this question and this page for more details.

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
  • 1
    Android uses mksh. Here's an interesting read: http://www.all-things-android.com/content/mirbsd-korn-shell-android-shell – Firelord Mar 28 '16 at 04:05