1. busybox usage
You can use busybox
# Busybox ls
Function is equivalent to running the LS command
The most common method is to create a link pointing to busybox. Different link names are used to complete different functions.
# Ln-s busybox ls
# Ln-s busybox RM
# Ln-s busybox mkdir
Then run the three links respectively:
#./Ls
#./RM
#./Mkdir
You can complete the functions of the ls rm and mkdir commands respectively.
2. Configure busybox
Busybox configuration programs and Linux kernel menu configuration methods are exactly the same. It is easy for anyone familiar with Linux Kernel configuration using make menuconfig.
# Cpbusybox-1.00.tar.gz/babylinux
# Cd/babylinux
# Tar xvfz busybox-1.00.tar.gz
# Cd busybox-1.00
# Make menuconfig
The following are functional options that need to be compiled into busybox.
General configuration options
Show verbose applet usage messages
Runtime SUID/SGID configuration via/etc/busybox. conf
Build options
Build busybox as a static binary (no shared libs)
This option must be selected so that busybox can be compiled into a static link executable file, and the runtime is independent of other function libraries. otherwise, other library files must be required to run and cannot work properly on a single Linux kernel.
Installation Options
Don't use/usr
This option must also be selected. Otherwise, after make install, busybox will be installed in the/usr of the original system, which will overwrite the original command of the system. after this option is selected, make install will generate a directory named _ install under the busybox Directory, which contains busybox and links to it.
Other options are some basic Linux Command Options. Compile the required commands. The default command is used. After configuration, exit and save the command.
3. Compile and install busybox
# Make
# Make install
After compilation, generate the subdirectory _ install in the busybox directory. The content is as follows:
Drwxr-XR-x 2 root Root 4096 November 24 15:28 Bin
Rwxrwxrwx 1 Root 11 November 24 15:28 linuxrc-> bin/busybox
Drwxr-XR-x 2 root Root 4096 November 24 15:28 sbin
The executable file busybox is in the bin directory, and all others point to its symbolic link.