Using Linux Commands on Windows with Busybox Configuration

▶ Introduction: Windows does not have commands like awk, sed, cat, cut, tail, head, grep, etc. for processing output or text (although type can barely replace cat and findstr can barely replace grep).

Using Linux Commands on Windows with Busybox Configuration

For users who are accustomed to the Linux environment but often use the Windows terminal without being familiar with it, the commands provided by Windows are often unknown and very cumbersome to use. Therefore, it is very necessary to have a set of commonly used Linux commands that work on Windows for these users. Although installing WSL on Win10 or above can also work, it is somewhat troublesome. So today I bring you a small tool for one-click configuration of Busybox [cos funny]▶ Configuration link:

https://cloud.189.cn/t/2u6Bbm6ziU3i

Access code: 0okh After downloading, unzip the package and double-click the configure Busybox.bat batch file.

Using Linux Commands on Windows with Busybox Configuration

Wait for the console output as shown in the figure to configure the path to C:\busybox.

Using Linux Commands on Windows with Busybox Configuration

After the configuration is complete, we press Win+R to open cmd, input sed, awk commands, and the prompt below indicates that the configuration has taken effect.

Using Linux Commands on Windows with Busybox Configuration

Here is a screenshot of the commands available in Busybox. After configuration, you can also input busybox –list to view the available commands.

Using Linux Commands on Windows with Busybox Configuration

If you look closely, you will find that all the exe files in the Busybox configuration path C:\busybox have the same icon and size. In fact, all these commands are in the busybox.exe command. The working principle of Busybox is: ① When the filename is Busybox or does not contain a command, it calls the corresponding command by receiving argument 1. For example, if I want to execute the cat command, I can input busybox cat. ② When the filename is the corresponding command, it executes itself as the corresponding command. Therefore, all files in the configured C:\busybox are the same file, just copied according to principle ② of Busybox’s list [masochistic funny]▶ Expansion: ① Input busybox bash or bash to simulate a shell terminal.

Using Linux Commands on Windows with Busybox Configuration

② To execute shell scripts, it is important to note that when writing scripts, commands included in Busybox can be used directly, while commands not included in Busybox need to be prepared and specified with a path.

Using Linux Commands on Windows with Busybox Configuration

For example, to patch boot with boot_patch, I specified the path of magiskboot to successfully patch the boot.

Using Linux Commands on Windows with Busybox Configuration

③ ….. ④ Wait for your exploration.

Leave a Comment

×