• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to use BusyBox on Linux

AnonyViet by AnonyViet
January 24, 2023
in Network
0

When using linux, you are probably familiar with the Terminal command line. Some basic commands, such as cd, kill, and echo are built into your shell. Other commands such as ls, mv and cat are part of the core utility package (usually GNU cores). But there are always other options in the open source world, and one of the most interesting is BusyBox.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to use BusyBox on Linux

What is BusyBox in Linux?

BusyBox is an open source (GPL) project that provides simple implementations of nearly 400 common commands, including ls, mv, ln, mkdir, more, ps, gzip, bzip2, tar, and grep. It also contains a version of the programming language awkeditor sedfile system checker fsckpackage manager rpm and dpkg, and of course, a shell (sh) that provides easy access to all these commands. In short, it contains all the commands necessary for a POSIX system to perform general system maintenance tasks as well as many administrative and user tasks.

In fact, BusyBox even contains an init command that can be launched as PID 1 to serve as the parent process for all other system services. In other words, BusyBox can be used as an alternative to systemd, OpenRC, sinit, init and other launch daemons.

BusyBox is very light, just under 1 MB, so it has gained popularity in embedded, Edge and IoT devices. In the world of containers and cloud computing, BusyBox is also popular as a platform for Linux container images.

Simplify

Part of BusyBox’s appeal is its minimalism. All commands are compiled into a single binary file (busybox) and has only 81 pages but includes nearly 400 commands.

For comparison example, here is the output of the shadow version of useradd –help:

-b, --base-dir BASE_DIR       base directory for home
-c, --comment COMMENT         GECOS field of the new account
-d, --home-dir HOME_DIR       home directory of the new account
-D, --defaults                print or change the default config
-e, --expiredate EXPIRE_DATE  expiration date of the new account
-f, --inactive INACTIVE       password inactivity
-g, --gid GROUP               name or ID of the primary group
-G, --groups GROUPS           list of supplementary groups
-h, --help                    display this help message and exit
-k, --skel SKEL_DIR           alternative skeleton dir
-K, --key KEY=VALUE           override /etc/login.defs
-l, --no-log-init             do not add the user to the lastlog
-m, --create-home             create the user's home directory
-M, --no-create-home          do not create the user's home directory
-N, --no-user-group           do not create a group with the user's name
-o, --non-unique              allow users with non-unique UIDs
-p, --password PASSWORD       encrypted password of the new account
-r, --system                  create a system account
-R, --root CHROOT_DIR         directory to chroot into
-s, --shell SHELL             login shell of the new account
-u, --uid UID                 user ID of the new account
-U, --user-group              create a group with the same name as a user

And here is the BusyBox version of the same command:

-h DIR    Home directory
-g GECOS  GECOS field
-s SHELL  Login shell
-G GRP    Group
-S            Create a system user
-D            Don't assign a password
-H            Don't create home directory
-u UID    User id
-k SKEL   Skeleton directory (/etc/skel)

Is this difference a feature or a limitation, depending on whether you want 20 options or ten options in your commands. For some users and use cases, BusyBox’s minimalism provides just enough of what the user wants. For others, this is a minimal environment for fallback or as a foundation to install more powerful tools like Bash, Zsh, GNU Awk, etc.

How to install BusyBox

On Linux you can install BusyBox using your package manager. For example on Fedora:

$ sudo dnf install busybox

On Debian:

$ sudo apt install busybox

On macOS, use MacPorts or Homebrew. On Windows, use Chocolatey.

You can set BusyBox as a shell with the command chsh --shellfollowed by the link to the BusyBox app sh. I save BusyBox in /lib64, but its location depends on the distribution you have installed.

$ which busybox
/lib64/busybox/busybox
$ chsh --shell /lib64/busybox/sh

Replacing all common commands with BusyBox is a bit more complicated, because most distributions “default” to search specific packages for specific commands. In other words, while it’s technically possible to replace init with BusyBox’s init, your package manager may refuse to let you remove a package containing init for fear you’ll render the system unbootable. There are several distributions built around BusyBox, so this is probably the easiest way to experience a system built around BusyBox.

Try BusyBox

You don’t need to change your shell to BusyBox permanently just to try it. You can launch the BusyBox shell from your current shell:

$ busybox sh
~ $

However, your system still has non-BusyBox versions of commands installed, so to experience BusyBox’s tools you must enter the commands as arguments to the busybox executable:

~ $ busybox echo $0
sh
~ $ busybox ls --help
BusyBox vX.YY.Z (2021-08-25 07:31:48 NZST) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctu] [-w WIDTH] [FILE]...

List directory contents

 -1  One column output
 -a  Include entries that start with .
 -A  Like -a, but exclude . and ..
 -x  List by lines
[...]

For the “full” BusyBox experience, you can create symlinks to busybox for each command. This is easier than imagined, as long as you use a for loop:

$ mkdir bbx
$ for i in $(bbx --list); do \
ln -s /path/to/busybox bbx/$i \
done

Add the bind directory to the beginning of your path and launch BusyBox:

$ PATH=$(pwd)/bbx:$PATH bbx/sh

BusyBox is a fun project and an example of the bare minimum of computing. Whether you use BusyBox as a lightweight environment for an antique computer, or use it for an embedded device, to try out a new init system, or just curious, you can give BusyBox a try. .

Also, you should also take a look at the 10 most dangerous Linux commands here.

The article achieved: 5/5 – (100 votes)

Tags: BusyBoxLinux
Previous Post

API Security 101: Injection – AnonyViet

Next Post

DDosify – Website DDoS load testing tool

AnonyViet

AnonyViet

Related Posts

Save image as Type contains malicious code: Remove immediately before losing money unfairly!
Network

Save image as Type contains malicious code: Remove immediately before losing money unfairly!

March 19, 2026
Instructions on how to register a .co.uk domain name for free for 1 year
Network

Instructions on how to register a .co.uk domain name for free for 1 year

March 12, 2026
How to Setup Paperclip AI: Create a Company for AI Agent
Network

How to Setup Paperclip AI: Create a Company for AI Agent

March 12, 2026
Compilation of free and cheap APIs to run OpenClaw stably
Network

Compilation of free and cheap APIs to run OpenClaw stably

March 10, 2026
3 Services to Determine IP Location for Website (IP Geolocation API)
Network

3 Services to Determine IP Location for Website (IP Geolocation API)

March 10, 2026
How to buy a .STORE domain name for 1 USD (2026): Detailed instructions from A–Z
Network

How to buy a .STORE domain name for 1 USD (2026): Detailed instructions from A–Z

March 3, 2026
Next Post
DDosify – Website DDoS load testing tool

DDosify - Website DDoS load testing tool

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

April 18, 2026
How to avoid Adblock detection on Youtube with 4 good tips

How to avoid Adblock detection on Youtube with 4 good tips

April 17, 2026
How to transfer ChatGPT data to Claude is extremely simple

How to transfer ChatGPT data to Claude is extremely simple

April 16, 2026
How to authenticate the owner’s SIM on VNeID from April 15

How to authenticate the owner’s SIM on VNeID from April 15

April 15, 2026
How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

April 18, 2026
How to avoid Adblock detection on Youtube with 4 good tips

How to avoid Adblock detection on Youtube with 4 good tips

April 17, 2026
How to transfer ChatGPT data to Claude is extremely simple

How to transfer ChatGPT data to Claude is extremely simple

April 16, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

April 18, 2026
How to avoid Adblock detection on Youtube with 4 good tips

How to avoid Adblock detection on Youtube with 4 good tips

April 17, 2026
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply