山田 徹
ホーム

読み込み中です。

読み込み中です。

ダウンロード

 busybox64のダウンロードはbusybox-w32から無料でダウンロードできる。公式サイトにはWindowsXPでも動く(制限あり)と書いてあるが、WindowsXPを持っていないので動作するかわからない。Windows10とWindows8での動作は確認した。64bit版の他にも32bit版がある。環境に合わせてダウンロードしてほしい。
ちなみにSHAハッシュ値はこちら
過去のbusybox64一覧はこちら

 当サイトでは64bit版Windows 10で64bit版のbusybox64.exeを使っていく。

インストール

 私は会社や学校など、様々な場所で使いたいのでUSBにインストールした。基本はダウンロードしたbusybox64.exeを配置するだけで良い。busybox64.exeをinstallオプションで起動するとインストールできるらしいが、インストールせずとも十分利用できるので今回は省略する。インストール方法は公式サイトに書かれているので適宜見ていただきたい。

起動

 まず、コマンドプロンプトをbusybox64.exeのある場所で起動する。エクスプローラーでbusybox64.exeのあるディレクトリでShift + 右クリックをして、表示されたメニューの「コマンドプロンプトをここで開く」を選択することでディレクトリの移動なしでコマンドプロンプトを簡単に起動することができる。(使用しているWindowsのバージョンによってはPowershellの場合もある。Powershellでもbusybox64の起動は可能)
 上記の方法でもうまく行かなかった場合はコマンドプロンプトでcdしてbusybox64.exeまで移動すれば良い。詳しい説明は割愛する。

 起動、移動後に"busybox64.exe"と入力すると起動ができる。

Z:\bin>busybox64.exe
BusyBox v1.31.0-FRP-3128-g241d4d4ac (2019-04-26 10:34:03 BST) multi-call binary
(mingw64-gcc 8.3.0-1.fc29; mingw64-crt 5.0.4-2.fc29)

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

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [DIR]
   or: busybox --uninstall [-n] file
   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, 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, iconv, 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, readlink, realpath, reset, rev, rm, rmdir, rpm, rpm2cpio, sed, seq, sh, sha1sum,
	sha256sum, sha3sum, sha512sum, shred, shuf, sleep, sort, split, ssl_client, stat, strings, su, sum, tac, tail,
	tar, tee, test, timeout, touch, tr, true, truncate, ts, 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

Z:\bin>

 busybox64で使用できるコマンドが表示された。次に、busybox64.exe内にあるbashを起動する。「busybox64.exe bash」でbashが起動できる。

Z:\bin>busybox64 bash
Z:\bin $

 これだけでbashが起動できる。プロンプトがコマンドプロンプトと違い、Linuxぽくなっていれば、bashが起動している。この状態でlsやclearなどのコマンドを打つとbusyboxのコマンドが起動する。

最後に

 busybox64.exeだけでWindowsでLinuxコマンドが使えるようになる。さらにbashが同封されているのでシェルスクリプトを回すことも可能。また、パイプやバックグラウンド起動(job機能は無い)なども可能。 さらに面白いことに、Windowsのコマンドも一部使用できる。例えば、bash起動時にcmdと入力すると、コマンドプロンプトが起動する。busybox64に含まれるコマンドでは物足りない(sshなど)場合は、Windows版のsshなどをインストールすることで起動することができる。 gzipやbzip2、tarコマンドも使えるので、バックアップをサクッと作成したいときや展開したい時にとても便利である。

雑感

 Windowsさん、busyboxぐらいは標準搭載してください...。