Having docker installed run
docker run -it ubuntu:22.04
After this command you'll get working no-frills ubuntu shell
First of all I want to explore which utils are available in /bin directory. So let's execute ls /bin
. We'll see bunch of utils.
Also you can check out /usr/bin directory because it also provides some utils to work with (why do we need both with file-duplicates?)
For beginning I want to add my own util and call it wherever in file system tree I stay
echo "echo hello world!" > /bin/my_util && chmod +x /bin/my_util && my_util
Now you can go wherever you want and run my_util
command which will print "hello world!" message
Now you can note that content of /bin/my_util
looks like a human-readable string. Let's create an C program and compile it to check if it works the same
TODO::
gcc, file, objdump commands are unavailable, so consider installing them via (binutils provides objdump util):
apt update &&
apt install gcc file make binutils vim