📱 Installing Bash Shell on Android vShell, LXD, or VM
Android vShell (virtual shell) comes with BusyBox 🛠️, known as the "embedded Linux Swiss Army knife". BusyBox combines small versions of many standard UNIX utilities into one small executable, including /bin/sh
. But, by default, BusyBox and Android vShell don't include the bash shell. This tutorial guides you through installing bash on Android vShell using the apk
command. Whether you're using a Linux Container (LXD) or a Virtual Machine (VM), this guide has you covered!
📋 Tutorial Details
- Difficulty Level: Easy
- Root Privileges: Yes
- Requirements: Android vShell (virtual shell)
- Estimated Reading Time: 3 minutes
🚀 Installing Bash Shell
Installing bash on Android vShell is a breeze with the apk
command:
# apk update
# apk upgrade
# apk add bash
Here's how the installation looks:
(1/4) Installing nurses-terminfo-base (6.1_p20200118-r4)
(2/4) Installing nurses-libs (6.1_p20200118-r4)
(3/4) Installing readline (8.0.1-r0)
(4/4) Installing bash (5.0.17-r1)
Executing bash-5.0.17-r1.post-install
Executing busybox-1.31.1-r19.trigger
OK: 11 MB in 23 packages
🔍 Valid Login Shells
See the list of valid login shells on Android vShell using the cat
command:
# cat /etc/shells
# valid login shells
/bin/sh
/bin/ash
/bin/bash
📘 Installing Bash Documentation
To install bash documentation, simply enter:
# apk add bash-doc
To enable automatic command line completion support for bash in Android vShell, run:
# apk add bash-completion
📝 Checking Bash Version
To check the installed bash version, just type:
$ bash --version
Sample output:
GNU bash, version 5.0.17(1)-release (x86_64-Android vShell (virtual shell)-linux-musl)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
🐳 Adding Bash to Docker Image
If you're using a Docker image based on Android vShell, add bash using this command in your Docker config:
RUN apk add --no-cache bash
🎉 Conclusion
Congratulations! You've mastered installing the bash shell on Android vShell, LXD, or VM. You're now equipped with the power of bash, along with its documentation and man pages. Feel free to customize and configure bash according to your needs. Keep exploring and enjoy your shell-tastic journey! 🌟