brc provides the ability to run commands in clients, properly chrooting to
avoid conflicts. Once Bedrock Linux is properly set up, it will allow the user
to transparently run commands otherwise not available in a given client. For
firefox is installed in a Arch client but not in a Debian client,
and a program from the Debian client tries to execute
firefox, the Arch
firefox will be executed as though it were installed locally in Debian.
firefox is installed in multiple clients (such as Arch and Fedora), and
the user would like to specify which is to run (rather than allowing Bedrock
Linux to chose the default), one can explicitly call
brc, like so:
If no command is given,
brc will attempt to use the user's current
If the value of
$SHELL is not available in the client it will fail.
Very early (before any public release) versions of Bedrock Linux would try to
detect if you tried to run a command which isn't available and, on the fly,
attempt to find the command in a client. This proved to slow. Instead,
brp command will search for all of the commands available and store
them in directories which can be included in one's
$PATH so that those
commands work transparently.
/etc/profile should include the relevant
directories in the
brl command will run its argument in all available clients. If, for
example, you want to test to ensure that all of your clients have internet
access, you could run the following:
brl ping -c 1 google.com
Updating all of the clients is a very common task, and so
bru was created to
make it a simple one.
bru can be used to update all of the clients in a
single command. Note that eventually this will likely be replaced by a more
comprehensive package manager manager (not a typo) command.
brs will set up the
share items from
brclients.conf in the client(s)
provided as (an) argument(s). In Bedrock Linux 1.0alpha3, this is automatically
used at boot and rarely needs to be run by the user. The exception is if a new
client is added or a share mount point accidentally removed, in which case the
user can simply call
brs . Unlike prior versions, this will
not check if a client has already been set up - do not run in a client which
has already been set up.
Due to its purposeful minimalism, the core Bedrock Linux install only includes busybox's very limited shells; users will most likely want to use a client's shells by default. However, this raises three problems:
/bin/sh? For example, maybe the chroot system broke, or he/she is debugging a busybox update.
/etc/passwd. However, this path will likely change depending on which client is attempting to run the shell. For example, the core Bedrock Linux see
/var/local/brpath/zsh, but a Debian client will see the same
/bin/zsh. Having two differing paths for zsh like this will not work with a single login and the traditional Unix
Bedrock Linux provides two options to resolve these issues:
brsh, which will log in to a configured client's shell, if available. If it is not available, it will automatically drop to
/bin/shif it is available in the client, and if not, then it drops down to the core Bedrock's
/bin/sh. The path to
brshshould remain in the same location irrelevant of which client is running it, meaning it will work in /etc/passwd while still allowing access to shells which have changing paths.
The traditional Unix /etc/passwd allows creating multiple entries with different login names and different shells but same password, home, etc, for the same user. For example:
This can be advantageous over
brsh as (1) it should work if
brsh fails to
detect a client has broken, and (2) it does not require logging in, changing
brsh configuration file, then logging back out, and logging back in
again, if the user wants to directly log into the core Bedrock shell.
bri command will provide information about the clients based on which
flag is used.
bri -lwill print a List of clients.
bri -nwill print the name of the client in which the command is run.
bri -pwill print the path of the client in which the command is run if no arguments are given. Otherwise, it will print the paths of the clients provided in the argument.
bri -swill print the shared mount points for a client. It does not check if these are actually set up yet (from brs); it only prints the items listed in the brclients.conf for the respective client(s). If no argument is provided, it will print for the client in which the command is run; otherwise, it will print for all clients.
bri -wwill print the client which will provide the command if it is not available locally.
bri -Wwill print the client which will provides the command - either the client it is run in (ie,
bri -n) if it is available locally or the output of
bri -wif it is available in the brpath.
bri -cwill cache the values of
-pto speed up future requests. Note that this requires root. It is recommended that this is run in newly made clients immediately after they are made.
brw command is simply an alias to
bri -n for convenience.