Use of busybox

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.