Sign in

Photo by Elena Koycheva on Unsplash

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.:

“Nothing special” at the first glance, but — it is really… addictive
(and probably there is a lot of addicted users — note that 40 years!).

Thinking of “where to start” (when I decided to level up my addiction) I have focused on fortune’s…


Krasiejów (Poland)

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…


Photo by Diego Fernandez on Unsplash

Docker & Lxc

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:

e.g.:

Then we can check the NS identifiers used by the main process working in a container:

It’s worth to mention that in systems different than GNU/Linux docker will work in a virtual machine, so the process…


Photo by Tri Eptaroka Mardiana on Unsplash

Namespace: Network (net)

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 veth driver:

The command above will let us create two new network interfaces in our GNU/Linux system — ve0 and ve1. Those interfaces are already connected to each other, which we can…


Photo by Morning Brew on Unsplash

Namespace: UTS

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:

And for greater clarity of the description let’s look at PID, with which our new namespace is “connected”:


Photo by Cameron Venti on Unsplash

Namespace: Mount (mnt)

For a short presentation of the functioning of this NS, I will use the command chroot. 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):

The above will work, but if it is to make sense (for this exercise) /directory


Photo by frank mckenna on Unsplash

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:

https://web.archive.org/web/20070430061040/http://luka.org.pl:80/blog

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…

Lukasz

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store