Here's what I've written (so far):

Difference between /dev/console, /dev/tty, and /dev/tty0

1. Introduction In this tutorial, we’ll first explore the two tty drivers present in a Linux system; /dev/tty and /dev/console. Then we’ll discover the different roles of /dev/console, /dev/tty0 and /dev/tty. 2. /dev/console /dev/console is known as the system console. Historically this was the terminal attached directly to the Linux computer. Now it provides an option […]

Read More →

Read Random Line From a File in Linux

1. Overview In this tutorial, we’ll look at different strategies to randomly choose a line of text from a file. 2. Creating Our Sample File Before we begin, let’s create a file called example_file.txt, which will contain 10 numbered lines: $ : > example_file.txt; seq 1 10 | xargs -I % echo line % | […]

Read More →