Questions tagged [busybox]

BusyBox is a single executable implementation of the common UNIX utilities that has been optimized for minimal size.

BusyBox: The Swiss Army Knife of Embedded Linux

BusyBox combines limited versions of the UNIX utilities commonly found in the GNU fileutiles, shellutils, etc. packages into one executable that has been optimized for systems with limited resources (such as embedded systems). The BusyBox tools are not as full featured as their GNU counterparts but they provide the bare essentials and necessary functionality.

BusyBox is also very modular so the developer can only include the features and commands that they need.

References:

636 questions
14
votes
2 answers

How do I make an HTTPS call in a Busybox Docker container running Go?

I am trying to make an HTTPS call in a Docker container running a Go binary. This gives me the following error: x509: failed to load system roots and no roots provided Having looked this up, it seems the problem is that the BusyBox docker image…
Ismail Khan
  • 842
  • 2
  • 8
  • 20
13
votes
2 answers

Execute mongodb binaries on alpine linux

I'm trying to run the binary mongodb in Alpine 64bit Linux for a docker container. But when running the command: ./mongodb the following error occurs: bash-4.3 # ./mongod bash: ./mongod: No such file or directory. For what reason it can not run…
Rodrigo Gattermann
  • 131
  • 1
  • 1
  • 3
12
votes
1 answer

Does Alpine Linux handle certs differently than Busybox?

I started with a base image errordeveloper/oracle-jdk. This Dockerfile is shown here for reference: FROM progrium/busybox MAINTAINER Ilya Dmitrichenko RUN opkg-install curl ca-certificates ENV JAVA_HOME…
Greg
  • 10,696
  • 22
  • 68
  • 98
10
votes
2 answers

Real-time display of `date` changes on Linux

On an embedded Linux device that does not present /dev/rtc*, how can I set off a console window writing the value of the Real-Time Clock to the console, on the tick, every time it changes? Results would be like: $ **someCmd** Mon Mar 14 16:43:22 UTC…
Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
10
votes
2 answers

bash: unable to set and use alias in the same line

I would expect the second line to say foo instead of command not found: $ alias foo="echo bac" ; foo; -bash: foo: command not found $ foo bac $ Why won't the second line say foo? Tested with the following shells, same behavior: bash 3.2.5 zsh…
Motiejus Jakštys
  • 2,769
  • 2
  • 25
  • 30
10
votes
6 answers

Using awk printf to urldecode text

I'm using awk to urldecode some text. If I code the string into the printf statement like printf "%s", "\x3D" it correctly outputs =. The same if I have the whole escaped string as a variable. However, if I only have the 3D, how can I append the \x…
Johan
  • 405
  • 5
  • 14
10
votes
3 answers

grep substring between two delimiters

I have a lot of bash scripts that use perl expressions within grep in order to extract a substring between two delimiters. Example: echo BeginMiddleEnd | grep -oP '(?<=Begin).*(?=End)' The problem is, when I ported these scripts to a platform…
Ulrik
  • 1,131
  • 4
  • 19
  • 37
9
votes
2 answers

Portable way to build up arguments for a utility in shell?

I'm writing a shell script that's meant to run on a range of machines. Some of these machines have bash 2 or bash 3. Some are running BusyBox 1.18.4 where bin/bash exists but /bin/bash --version doesn't return anything at all foo=( "hello" "world"…
user1011471
  • 1,090
  • 2
  • 14
  • 34
8
votes
3 answers

Alternatives to xargs -l

I want to rename a bunch of dirs from DIR to DIR.OLD. Ideally I would use the following: find . -maxdepth 1 -type d -name \"*.y\" -mtime +`expr 2 \* 365` -print0 | xargs -0 -r -I file mv file file.old But the machine I want to execute this on has…
eatloaf
  • 607
  • 1
  • 9
  • 16
8
votes
0 answers

IOException: error=13, permission denied

I am trying to run some LINUX like commands from an android application, I want my application to run some custom commands like pkg, dpkg etc. basically I need my application to act as a terminal app, for this, I created a Linux file structure with…
Shahbaz Ali
  • 1,262
  • 1
  • 12
  • 13
8
votes
1 answer

POSIX shell comments in command-substitutions

I'm writing a shell, and am getting unexpected parsing from both bash, dash, and busybox's ash: echo "`echo a #`" prints a, however echo "$(echo a #)" gives an error about missing a closing ). How is a comment in a command-substitution parsed…
programmerjake
  • 1,794
  • 11
  • 15
8
votes
2 answers

buildroot add packages with submodules

buildroot supports to download packages from git repo. But my git repo contains submodules. How to order buildroot to download package with submodule?
Yuri
  • 1,179
  • 4
  • 13
  • 27
8
votes
3 answers

install apk in background using busybox

can i install apk in background using busybox on rooted device ??? i see something like that but it doesn't work process install; CommandCapture command = new CommandCapture(0, "chmod 777…
Omar Abdan
  • 1,901
  • 17
  • 29
7
votes
7 answers

How to generate random numbers in the BusyBox shell

How can I generate random numbers using AShell (restricted bash)? I am using a BusyBox binary on the device which does not have od or $RANDOM. My device has /dev/urandom and /dev/random.
Ankur Agarwal
  • 23,692
  • 41
  • 137
  • 208
7
votes
1 answer

nslookup can not get service ip on latest busybox

Reproduce steps: kubectl run busybox1 --generator=run-pod/v1 --image=busybox:1.28 -- sleep 3600 kubectl run busybox2 --generator=run-pod/v1 --image=busybox:1.31.1 -- sleep 3600 kubectl exec -ti busybox1 -- nslookup kubernetes.default works…
newme
  • 577
  • 6
  • 17
1
2
3
42 43