Windows – busybox

Loading

BuzyBox 匯集常用 UNIX 指令於單一執行檔的工具集,它包含了七十多種 Linux 上標準的工具程式,需要的磁碟空間僅幾百 k,為何這麼小的容量,卻能提供為數不少的常用工具呢?這訣竅在於 busybox 在編譯後,雖然整體只是一個執行檔,卻可以透過 symbolic link 的方式,將常用指令連到 busybox 這個執行檔上.
一般常用在嵌入式系統上 .Linux 版的 busybox 可在 http://busybox.net 找到參考資料及下載, Windows 版本的 busybox 可以在 https://frippery.org/busybox/ 下載.

相關的指令如下:

C:\Users\Ben\Downloads>busybox.exe
BusyBox v1.29.0-FRP-2187-g28ade29e9 (2018-05-13 08:59:14 BST) multi-call binary
(mingw32-gcc 7.2.0-1.fc28; mingw32-crt 5.0.2-2.fc27)

BusyBox is copyrighted by many authors between 1998-2018.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [DIR]
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  The shell in this build
        is configured to run built-in utilities without $PATH search.
        You don't need to install a link to busybox for each utility.
        To run external program, use full path (/sbin/ip instead of ip).

Currently defined functions:
        [, [[, ar, arch, ash, awk, base64, basename, bash, bunzip2, busybox,
        bzcat, bzip2, cal, cat, chmod, cksum, clear, cmp, comm, cp, cpio, cut,
        date, dc, dd, df, diff, dirname, dos2unix, dpkg-deb, du, echo, ed,
        egrep, env, expand, expr, factor, false, fgrep, find, fold, fsync,
        ftpget, ftpput, getopt, grep, groups, gunzip, gzip, hd, head, hexdump,
        id, ipcalc, kill, killall, less, link, ln, logname, ls, lzcat, lzma,
        lzop, lzopcat, man, md5sum, mkdir, mktemp, mv, nc, nl, od, paste,
        patch, pgrep, pidof, pipe_progress, pkill, printenv, printf, ps, pwd,
        rev, rm, rmdir, rpm, rpm2cpio, sed, seq, sh, sha1sum, sha256sum,
        sha3sum, sha512sum, shred, shuf, sleep, sort, split, ssl_client, stat,
        strings, sum, tac, tail, tar, tee, test, timeout, touch, tr, true,
        truncate, ttysize, uname, uncompress, unexpand, uniq, unix2dos, unlink,
        unlzma, unlzop, unxz, unzip, usleep, uudecode, uuencode, vi, watch, wc,
        wget, which, whoami, whois, xargs, xxd, xz, xzcat, yes, zcat

可以透過 busybox [function [arguments]…] 的方式來執行指令或是安裝後使用.

C:\Users\Ben\Downloads>.\busybox\ls /
$Recycle.Bin               ProgramData
BOOTNXT                    Recovery
BOOTSECT.BAK               System Volume Information
Boot                       Users
Documents and Settings     Windows
PerfLogs                   bootmgr
Program Files              pagefile.sys
Program Files (x86)
C:\Users\Ben\Downloads>mkdir busybox

C:\Users\Ben\Downloads>busybox.exe --install busybox\

C:\Users\Ben\Downloads>.\busybox\ls
ChromeSetup.exe  busybox          busybox.exe      desktop.ini

最後還需要設定 PATH 環境變數,把剛剛安裝的 Busybox 路徑指定至 PATH 環境變數.
在 system / Advanced system settings / Advanced / Environment Variables / system variable / PATH

PATH 環境變數,可以透過指令來確認.

C:\Users\Ben>echo %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0\;C:/Users/Ben/Downloads/busybox
沒有解決問題,試試搜尋本站其他內容

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料