It looks like “fortune” (the computer program described in Wikipedia as a Fortune (Unix)) has been around for something like 40 years already. It is a simple program that prints out a randomized quotation from its database, e.g.:
➜ ~ fortune
The first duty of a revolutionary is to get away with it.
-- Abbie Hoffman
“Nothing special” at the first glance, but — it is really… addictive
(and probably there is a lot of addicted users — note that 40 years!).
Codi is a vim plugin to run your code in the editor. Who knows Quokka (which in my case was the first such a tool I’ve been using) knows what I mean. I can’t say, at least for the time being, whether it increases productivity or not — in my case, it is just for fun, but definitely — there is potential in it!
Installation is straight forward; however, if you have not been working with the vim plugins before, it can look a bit complex as there is a lot (at least a few :)) plugins managers for vim…
In the previous four parts I have described (more or less detailed) Linux Namespaces — now let’s practice more with docker and Lxc! If you have any docker container started in your system — check its PID:
$ docker inspect CONTAINER | grep -i pid
$ docker inspect ba26bbd2de76 | grep -i pid
Then we can check the NS identifiers used by the main process working in a container:
$ lsns -p PID
It’s worth to mention that in systems different than GNU/Linux docker will work in a virtual machine, so the process…
Network NS is quality itself :) It may be the only NS (maybe except for mnt) the independent use of which could be not only “demonstrative”, but also completely practical. A great example of this is the Mininet project!
To present you a part of possibilities that give us net namespace, we must first get to know the
$ ip link add ve0 type veth peer name ve1
The command above will let us create two new network interfaces in our GNU/Linux system —
ve1. Those interfaces are already connected to each other, which we can…
UTS stands for Unix Timesharing System, and NS itself is responsible for “isolating”… hostname (and NIS, but NIS itself has lost his meaning, I believe). It is worth noticing that both a page of man manual and the page in Wikipedia concerning NS do not mention the full name of UTS — so the full name, because of its “little” preciseness (as I suspect), is rather not used.
Let’s create a new UTS namespace:
$ sudo unshare -u
And for greater clarity of the description let’s look at PID, with which our new namespace is “connected”:
(unshare)$ echo $$
For a short presentation of the functioning of this NS, I will use the command
chroot itself doesn't have anything to do with the namespaces (at least nothing I know of). Still, I hope that a short example of usage
chroot without and with mnt namespace will show possibilities of the namespaces itself.
Executing the first command makes the shell process started with the directory
/directory set as the main file system (in the context of only this new shell process):
$ chroot /directory
This series of articles has been formerly published on my blog site and can be found here: http://luka.sh/node/124.
My first encounter with containers in the Linux edition was significantly “burdened” with the previous experiences with virtualization. The containers were another, after paravirtualization, step towards making the visualization even “lighter” and less resource consuming! I thought they were. When my colleagues were experimenting with the duet Vagrant + VirtualBox I tried to experiment with Lxc. Still, I was not especially interested in how exactly the Lxc works — it was just “a virtual environment”. A moment of “enlightenment” (some kind of)…
Time passes! I’ve been writing blog posts — even if not very frequently — for over a decade so far! The Internet remembers:
It is incredible. But (I’m sure) it’s also rather common — this not-really-true feeling that the last decade (vampires can put “century” here) passed so quickly!
Right now I imagine a mountaineer (let say the mountain guide) who achieved the very same mountain peak for the 100th time! (I believe such a score is not appropriate for “mortals” — it is why he must be a guide).
The point is that maybe (maybe) when this guide…