Sandra Henry-Stocker

Author Archives: Sandra Henry-Stocker

Linux control sequence tricks

There are quite a few control sequences available on Linux systems— many I use routinely, and some I've only just recently discovered— and they can be surprisingly useful. In today's post, we're going to run through a series of them and take a look at what they do and how they might be useful.To start, unless you're brand spanking new to the command line, you are undoubtedly familiar with the ctrl-c sequence that is used to terminate a running command. In print, this same sequence might be expressed as ^c or control-c and sometimes the "c" will be capitalized, but the expression always means "hold the control key and press the key specified — with no shift key or hyphen involved.To read this article in full, please click here

Red Hat reaches the Summit – a new top scientific supercomputer

Red Hat just announced its role in bringing a top scientific supercomputer into service in the U.S. Named “Summit” and housed at the Department of Energy’s OAK Ridge National Labs, this system with its 4,608 IBM compute servers is running — you guessed it — Red Hat Enterprise Linux.The Summit collaborators With IBM providing its POWER9 processors, Nvidia contributing its Volta V100 GPUs, Mellanox bringing its Infiniband into play, and Red Hat supplying Red Hat Enterprise OS, the level of inter-vendor collaboration has reached something of an all-time high and an amazing new supercomputer is now ready for business.To read this article in full, please click here

Comparing files and directories with the diff and comm Linux commands

There are a number of ways to compare files and directories on Linux systems. The diff, colordiff, and wdiff commands are just a sampling of commands that you're likely to run into. Another is comm. The command (think "common") lets you compare files in side-by-side columns the contents of individual files.Where diff gives you a display like this showing the lines that are different and the location of the differences, comm offers some different options with a focus on common content. Let's look at the default output and then some other features.Here's some diff output — displaying the lines that are different in the two files and using < and > signs to indicate which file each line came from.To read this article in full, please click here

Comparing files and directories with diff and comm

There are a number of ways to compare files and directories on Linux systems. The diff, colordiff, and wdiff commands are just a sampling of commands that you're like to run into. Another is comm. The command (think "common") lets you compare files in side-by-side columns the contents of individual files.Where diff gives you a display like this showing the lines that are different and the location of the differences, comm offers some different options with a focus on common content. Let's look at the default output and then some other features.Here's some diff output -- displaying the lines that are different in the two files and using < and > signs to indicate which file each line came from.To read this article in full, please click here

Copying and renaming files on Linux

Linux users have for many decades been using simple cp and mv commands to copy and rename files. These commands are some of the first that most of us learned and are used every day by possibly millions of people. But there are other techniques, handy variations, and another command for renaming files that offers some unique options.First, let’s think about why might you want to copy a file. You might need the same file in another location or you might want a copy because you’re going to edit the file and want to be sure you have a handy backup just in case you need to revert to the original file. The obvious way to do that is to use a command like “cp myfile myfile-orig”.To read this article in full, please click here

Using logger on Linux

The logger command provides an easy way to add log files to /var/log/syslog -- from the command line, from scripts or from other files. In today's post, we'll take a look at how it works.How easy is easy? This easy. Just type logger <message> on the command line and your message will be added to the end of the /var/log/syslog file.$ logger comment to be added to log $ tail -1 /vvar/log/syslog May 21 18:02:16 butterfly shs: comment to be added to log Command output You can also add the output from commands by enclosing the commands in backticks.$ logger `who` $ tail -1 /var/log/syslog May 21 18:02:43 butterfly shs: shs pts/0 2018-05-21 15:57 (192.168.0.15) Content from a file The contents of text files can be added by using the -f option. Put the name of the file to be added to the log following the -f option as shown below.To read this article in full, please click here

How to use logger on Linux

The logger command provides an easy way to add log files to /var/log/syslog — from the command line, from scripts, or from other files. In today's post, we'll take a look at how it works.How easy is easy? This easy. Just type logger <message> on the command line and your message will be added to the end of the /var/log/syslog file.$ logger comment to be added to log $ tail -1 /vvar/log/syslog May 21 18:02:16 butterfly shs: comment to be added to log Command output You can also add the output from commands by enclosing the commands in backticks.$ logger `who` $ tail -1 /var/log/syslog May 21 18:02:43 butterfly shs: shs pts/0 2018-05-21 15:57 (192.168.0.15) [ Two-Minute Linux Tips: Learn how to master a host of Linux commands in these 2-minute video tutorials ] Content from a file The contents of text files can be added by using the -f option. Put the name of the file to be added to the log following the -f option as shown below.To read this article in full, please click here

22 essential Linux security commands

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.To read this article in full, please click here(Insider Story)

22 essential security commands for Linux

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.sudo Running privileged commands with sudo  – instead of switching user to root  – is one essential good practice as it helps to ensure that you only use root privilege when needed and limits the impact of mistakes. Your access to the sudo command depends on settings in the /etc/sudoers and /etc/group files. [ Two-Minute Linux Tips: Learn how to master a host of Linux commands in these 2-minute video tutorials ] $ sudo adduser shark Adding user `shark' ... Adding new group `shark' (1007) ... Adding new user `shark' (1007) with group `shark' ... Creating home directory `/home/shark' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for shark Enter the new value, or press ENTER for the default Full Name []: shark Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y If you run sudo Continue reading

22 essential Linux security commands

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.sudo Running privileged commands with sudo  – instead of switching user to root  – is one essential good practice as it helps to ensure that you only use root privilege when needed and limits the impact of mistakes. Your access to the sudo command depends on settings in the /etc/sudoers and /etc/group files. [ Two-Minute Linux Tips: Learn how to master a host of Linux commands in these 2-minute video tutorials ] $ sudo adduser shark Adding user `shark' ... Adding new group `shark' (1007) ... Adding new user `shark' (1007) with group `shark' ... Creating home directory `/home/shark' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for shark Enter the new value, or press ENTER for the default Full Name []: shark Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y If you run sudo Continue reading

22 essential security commands for Linux

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.To read this article in full, please click here(Insider Story)

How to speak Linux

I didn’t even stop to imagine that people pronounced Linux commands differently until many years ago when I heard a coworker use the word “vie” (as in "The teams will vie for the title") for what I’d always pronounced “vee I”. It was a moment that I’ll never forget. Our homogenous and somewhat rebellious community of Unix/Linux advocates seemed to have descended into dialects – not just preferences for Solaris or Red Hat or Debian or some other variant (fewer back in those days than we have today), but different ways of referring to the commands we knew and used every day.The "problem" has a number of causes. For one thing, our beloved man pages don't include pronunciation guidelines like dictionaries do. For another, Unix commands evolved with a number of different pronunciation rules. The names of some commands (like "cat") were derived from words (like "concatenate") and were pronounced as if they were words too (some actually are). Others derived from phrases like "cpio" which pull together the idea of copying (cp) and I/O. Others are simply abbreviations like "cd" for "change directory". And then we have tools like "awk" that go in an entirely different direction by Continue reading

Blacklisting modules on Linux

The Linux kernel is modular — composed of modules that work together but are largely independent of each other. New functionality can be added when a kernel module is loaded, but there are times when you might need to block functionality because modules interfere with each other or leave a system vulnerable. When that is the case, you can restrict what modules the kernel is able to use by blacklisting the troublemakers. This blocks them from being loaded.Listing Kernel modules You can list kernel modules with the lsmod command. For a taste of what you’re likely to see, the lsmod command below shows us the top of the lsmod command output on a sample system.To read this article in full, please click here

Customizing your text colors on the Linux command line

If you spend much time on the Linux command line (and you probably wouldn't be reading this if you didn't), you've undoubtedly noticed that the ls command displays your files in a number of different colors. You've probably also come to recognize some of the distinctions — directories appearing in one color, executable files in another, etc.How that all happens and what options are available for you to change the color assignments might not be so obvious.[ Also read: Unix tip: Coloring your world with LS_COLORS | Get regularly scheduled insights by signing up for Network World newsletters. ] One way to get a big dose of data showing how these colors are assigned is to run the dircolors command. It will show you something like this:To read this article in full, please click here

What’s behind Cisco’s comeback?

Cisco Systems Inc. (NASDAQ: CSCO) in just the last week or so has taken over the top spot for year-to-date performance among the 30 equities comprising the Dow Jones industrial average, with its shares having risen nearly 20 percent in 2018. That’s a big deal. How did it happen? What pushed Cisco beyond its best-known-router reputation to being a top performer on the DOW?A little history about Cisco Cisco has been around for nearly as long as I've been working on Unix and Linux systems. Founded in December 1984 by two Stanford University computer scientists and clearly named after San Francisco, its logo clearly depicts the two towers of the Golden Gate Bridge and its line of products have kept it a major player in routers and switches. In fact, Cisco was on top of the tech world before the dot.com meltdown. Then it plunged with the rest of the tech sector.To read this article in full, please click here

What’s behind Cisco’s comeback?

Cisco Systems Inc. (NASDAQ: CSCO) in just the last week or so has taken over the top spot for year-to-date performance among the 30 equities comprising the Dow Jones industrial average, with its shares having risen nearly 20 percent in 2018. That’s a big deal. How did it happen? What pushed Cisco beyond its best-known-router reputation to being a top performer on the DOW?A little history Cisco has been around for nearly as long as I've been working on Unix and Linux systems. Founded in December 1984 by two Stanford University computer scientists and clearly named after San Francisco, its logo clearly depicts the two towers of the Golden Gate Bridge and its line of products have kept it a major player in routers and switches. In fact, Cisco was on top of the tech world before the dot.com meltdown. Then it plunged with the rest of the tech sector.To read this article in full, please click here

How to share files between Linux and Windows

Many people today work on mixed networks, with both Linux and Windows systems playing important roles. Sharing files between the two can be critical at times and is surprisingly easy with the right tools. With fairly little effort, you can copy files from Windows to Linux or Linux to Windows. In this post, we'll look at what is needed to configure your Linux and Windows system to allow you to easily move files from one OS to the other.Copying files between Linux and Windows The first step toward moving files between Windows and Linux is to download and install a tool such as PuTTY's pscp. You can get PuTTY from putty.org and set it up on your Windows system easily. PuTTY comes with a terminal emulator (putty) as well as tools like pscp for securely copying files between Linux and Windows systems. When you go to the PuTTY site, you can elect to install all of the tools or pick just the ones you want to use by choosing either the installer or the individual .exe files.To read this article in full, please click here

How to do math on the Linux command line

Can you do math on the Linux command line? You sure can! In fact, there are quite a few commands that can make the process easy and some you might even find interesting. Let's look at some very useful commands and syntax for command line math.expr First and probably the most obvious and commonly used command for performing mathematical calculations on the command line is the expr (expression) command. It can manage addition, subtraction, division, and multiplication. It can also be used to compare numbers. Here are some examples:Incrementing a variable $ count=0 $ count=`expr $count + 1` $ echo $count 1 Performing a simple calculations $ expr 11 + 123 134 $ expr 134 / 11 12 $ expr 134 - 11 123 $ expr 11 * 123 expr: syntax error <== oops! $ expr 11 \* 123 1353 $ expr 20 % 3 2 Notice that you have to use a \ character in front of * to avoid the syntax error. The % operator is for modulo calculations.To read this article in full, please click here

Finding what you’re looking for on Linux

It isn’t hard to find what you’re looking for on a Linux system — a file or a command — but there are a lot of ways to go looking.7 commands to find Linux files find The most obvious is undoubtedly the find command, and find has become easier to use than it was years ago. It used to require a starting location for your search, but these days, you can also use find with just a file name or regular expression if you’re willing to confine your search to the local directory.$ find e* empty examples.desktop In this way, it works much like the ls command and isn't doing much of a search.To read this article in full, please click here

Fedora 28 beta is ready for you to test

Fedora 28 has just been released in its beta version. That means it isn’t likely to be completely free of bugs and that you have a chance to participate in ensuring that it’s ready to go public on May 1.This news won’t be particularly surprising to the more enthusiastic Fedora users. Fedora’s release cycle is a fairly regular after all. Every six months, more or less, a new Fedora release is published. Many Fedora users have come to expect to see them around May Day and Halloween each year. Yet, while not surprising, the news is still exciting because of a number of new and enhanced features.Also read: Review: Free Linux Fedora server offers upgrades as they become available – no wait | Sign up: Subscribe to receive daily Network World updates New features in Fedora 28 beta So, what do you have to look forward to in this beta release or the planned May release?To read this article in full, please click here