Working with calendars on Linux

By Sandra Henry-Stocker

Linux systems can provide more help with your schedule than just reminding you what day today is. You have a lot of options for displaying calendars — some that are likely to prove helpful and others that just might boggle your mind.

date

To begin, you probably know that you can show the current date with the date command.

$ date
Mon Mar 26 08:01:41 EDT 2018

cal and ncal

You can show the entire month with the cal command. With no arguments, cal displays the current month and, by default, highlights the current day by reversing the foreground and background colors.

$ cal
     March 2018
Su Mo Tu We Th Fr Sa
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

If you want to display the current month in a “sideways” format, you can use the ncal command.

To read this article in full, please click here

From: Network World

Reviewing logins on Linux

By Sandra Henry-Stocker

The last command provides an easy way to review recent logins on a Linux system. It also has some useful options –- such as looking for logins for one particular user or looking for logins in an older wtmp file.

The last command with no arguments will easily show you all recent logins. It pulls the information from the current wtmp (/var/log/wtmp) file and shows the logins in reverse sequential order (newest first).

$ last
shs  pts/1  192.168.0.15  Mon Mar 19 17:48   still logged in
shs  tty2   /dev/tty2     Mon Mar 19 17:37   still logged in
shs  pts/2  192.168.0.15  Mon Mar 19 17:22 - 17:23  (00:00)
jdoe pts/3  192.168.0.15  Mon Mar 19 16:51 - 17:22  (00:31)

To look for logins for just one particular user, supply their username as an argument.

To read this article in full, please click here

From: Network World

Checking your network connections on Linux

By Sandra Henry-Stocker

The ip command has a lot to tell you about the configuration and state of your network connections, but what do all those words and numbers mean? Let’s take a deep dive in and see what all the displayed values are trying to tell you.

When you use the ip a (or ip addr) command to get information on all the network interfaces on your system, you’re going to see something like this:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:1e:4f:c8:43:fc brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.24/24 brd 192.168.0.255 scope global dynamic enp0s25
       valid_lft 57295sec preferred_lft 57295sec
    inet6 fe80::2c8e:1de0:a862:14fd/64 scope link
       valid_lft forever preferred_lft forever

The two interfaces on this system — the loopback (lo) and network (enp0s25) — are displayed along with a lot of stats. The “lo” interface is clearly the loopback. We can see the loopback IPv4 address (127.0.0.1) and the loopback IPv6 (::1) in the listing. The normal network interface is more interesting.

To read this article in full, please click here

From: Network World

Linux command history: Choosing what to remember and how

By Sandra Henry-Stocker

Linux history – the record of commands that you’ve used on the command line – can simplify repeating commands and provide some very useful information when you’re trying to track down how recent system or account changes might have come about. Two things you need to understand before you begin your sleuthing, however, are that the shell’s command memory can be selective and that dates and times for when commands were run are optional.

Basic Linux history

Let’s first look at how dates and times are recorded when commands are entered on the command line. By default, they are not. The history command simply provides a list of previously used commands. That’s all that is saved in the history file. For bash users, this information all gets stuffed into the .bash_history file; for other shells, it might be just .history.

To read this article in full, please click here

From: Network World

Linux: To recurse or not

By Sandra Henry-Stocker

Linux and recursion are on very good speaking terms. In fact, a number of Linux command recurse without ever being asked while others have to be coaxed with just the right option. When is recursion most helpful and how can you use it to make your tasks easier? Let’s run through some useful examples and see.

Easy recursion with ls

First, the ls command seems like a good place to start. This command will only list the files and directories in the current or specified directory unless asked to work a little harder. It will include the contents of directories only if you add a -R option. It provides a -r option, but that option causes the listing to be in reverse order as shown below while -R delves into the various subdirectories.

To read this article in full, please click here

From: Network World

What is a Linux “oops”?

By Sandra Henry-Stocker

If you check the processes running on your Linux systems, you might be curious about one called “kerneloops”. And that’s “kernel oops”, not “kerne loops” just in case you didn’t parse that correctly. Put very bluntly, an “oops” is a deviation from correct behavior on the part of the Linux kernel. Did you do something wrong? Probably not. But something did. And the process that did something wrong has probably at least just been summarily knocked off the CPU. At worst, the kernel may have panicked and abruptly shut the system down.

For the record, “oops” is NOT an acronym. It doesn’t stand for something like “object-oriented programming and systems” or “out of procedural specs”; it actually means “oops” like you just dropped your glass of wine or stepped on your cat. Oops! The plural of “oops” os “oopses”.

To read this article in full, please click here

From: Network World

It’s launch day for Sylabs: Promoting portable high-performance containers for Linux

By Sandra Henry-Stocker

Today is launch day for Sylabs — a new company focused on promoting Singularity within the enterprise and high-performance computing (HPC) environments and on advancing the fields of artificial intelligence (AI), machine/deep learning, and advanced analytics.

And while it’s launch day for Sylabs, it’s not launch day for the technology it will be promoting. Singularity has already made great strides for HPC and has given Linux itself more prominence in HPC as it has moved more deeply into the areas of scientific and enterprise computing. With its roots at Lawrence Berkeley National Laboratory (Berkeley Lab), Singularity is already providing a platform for a lot of heavy-duty scientific research and is expected to move into many other areas, such as machine learning, and may even change the way some difficult analytical problems are approached.

To read this article in full, please click here

From: Network World

The Linux ranger

By Sandra Henry-Stocker

For those of us who cut our technical teeth on the Unix/Linux command line, the relatively new ranger makes examining files a very different experience. A file manager that works inside a terminal window, ranger provides useful information and makes it very easy to move into directories, view file content or jump into an editor to make changes.

Unlike most file managers which work on the desktop, but leave you to the whims of ls, cat and more to get a solid handle on files and contents, ranger provides a very nice mix of file listing and contents displays with an easy way to start editing. In fact, among some Linux users, ranger has become very popular.

To read this article in full, please click here

From: Network World

Why use named pipes on Linux?

By Sandra Henry-Stocker

Just about every Linux user is familiar with the process of piping data from one process to another using | signs. It provides an easy way to send output from one command to another and end up with only the data you want to see without having to write scripts to do all of the selecting and reformatting. There is another type of pipe, however — one that warrants the name “pipe”, but has a very different personality. It’s one that you may have never tried or even thought about — the named pipe.

One of the key differences between regular pipes and named pipes is that named pipes have a presense in the file system. That is, they show up as files. But, unlike most files, they never appear to have contents. Even if you write a lot of data to a named pipe, the file appears to be empty.

To read this article in full, please click here

From: Network World

Exploring Linux containers

By Sandra Henry-Stocker

One of the most exciting things to happen in the Linux world in the last few years is the emergence of containers — self-contained Linux environments that live inside another OS and provide a way to package and isolate applications. They’re not quite virtual systems since they rely on the host OS to operate nor are they simply applications. Dan Walsh from Red Hat has said that on Linux “everything is a container“, reminding me of the days when people were claiming that everything on Unix was a file, but the vision has less to do with the guts of the OS and more to do with explaining how containers work and how they are different than virtual systems in some very interesting and important ways.

To read this article in full, please click here

From: Network World