The chpasswd command allows admins to change account passwords by piping username and password combinations to it.This can be done one-account-at-a-time or by putting all of the accounts to be modified in a file and piping the file to the command.[Get regularly scheduled insights by signing up for Network World newsletters.]
How to use chpasswd
Using the chpasswd command requires root privilege. You can switch to the root account and run a command like this:# echo nemo:imafish | chpasswd
Better yet, you can use sudo with a command like this:To read this article in full, please click here
The chpasswd command allows admins to change account passwords by piping username and password combinations to it.This can be done one-account-at-a-time or by putting all of the accounts to be modified in a file and piping the file to the command.[Get regularly scheduled insights by signing up for Network World newsletters.]
How to use chpasswd
Using the chpasswd command requires root privilege. You can switch to the root account and run a command like this:# echo nemo:imafish | chpasswd
Better yet, you can use sudo with a command like this:To read this article in full, please click here
The term "cheat sheet" has long been used to refer to listings of commands with quick explanations and examples that help people get used to running them on the Linux command line and understanding their many options.Most Linux users have, at one time or another, relied on cheat sheets to get them started. There is, however, a tool called "cheat" that comes with a couple hundred cheat sheets and that installs quickly and easily on Fedora and likely many other Linux systems. Read on to see how the cheat command works.Finding installed packages on Fedora Linux systems
First, to install cheat on Fedora, use a command like one of these:To read this article in full, please click here
The term "cheat sheet" has long been used to refer to listings of commands with quick explanations and examples that help people get used to running them on the Linux command line and understanding their many options.Most Linux users have, at one time or another, relied on cheat sheets to get them started. There is, however, a tool called "cheat" that comes with a couple hundred cheat sheets and that installs quickly and easily on Fedora and likely many other Linux systems. Read on to see how the cheat command works.Finding installed packages on Fedora Linux systems
First, to install cheat on Fedora, use a command like one of these:To read this article in full, please click here
There are quite a few ways to search through compressed text files on Linux systems without having to uncompress them first. Depending on the format of the files, you can choose to view entire files, extract specific text, navigate through file contents searching for content of interest, and sometimes even edit content. IFirst, to show you how this works, I compressed the words file on one of my Linux systems (/usr/share/dict/words) using these commands:$ cp /usr/share/dict/words .
$ 7z a words.7z words
$ bzip2 -k words
$ gzip -k words
$ xz -k words
$ zip words.zip words
How to use the grep command on Linux
The -k options used with the bzip2, gzip, and xz commands kept these commands from removing the original file, which they would by default. The resultant files then looked like this:To read this article in full, please click here
There are quite a few ways to search through compressed text files on Linux systems without having to uncompress them first. Depending on the format of the files, you can choose to view entire files, extract specific text, navigate through file contents searching for content of interest, and sometimes even edit content. IFirst, to show you how this works, I compressed the words file on one of my Linux systems (/usr/share/dict/words) using these commands:$ cp /usr/share/dict/words .
$ 7z a words.7z words
$ bzip2 -k words
$ gzip -k words
$ xz -k words
$ zip words.zip words
How to use the grep command on Linux
The -k options used with the bzip2, gzip, and xz commands kept these commands from removing the original file, which they would by default. The resultant files then looked like this:To read this article in full, please click here
The xargs command on Linux can make it easier to build and execute commands. If you want to run the same command for a group of files or users, xargs can often make that process easier. Here's a very simple example of xargs that creates or updates the update time on some files.$ echo file1 file2 file3 | xargs touch
$ ls -l
total 0
-rw-r--r--. 1 shs shs 0 Oct 15 12:41 file1
-rw-r--r--. 1 shs shs 0 Oct 15 12:41 file2
-rw-r--r--. 1 shs shs 0 Oct 15 12:41 file3
The command below is similar, but creates a file with blanks in its name because the -d specifies the input termination character.To read this article in full, please click here
The xargs command on Linux can make it easier to build and execute commands. If you want to run the same command for a group of files or users, xargs can often make that process easier. Here's a very simple example of xargs that creates or updates the update time on some files.$ echo file1 file2 file3 | xargs touch
$ ls -l
total 0
-rw-r--r--. 1 shs shs 0 Oct 15 12:41 file1
-rw-r--r--. 1 shs shs 0 Oct 15 12:41 file2
-rw-r--r--. 1 shs shs 0 Oct 15 12:41 file3
The command below is similar, but creates a file with blanks in its name because the -d specifies the input termination character.To read this article in full, please click here
Microsoft has just made the Windows Subsystem for Linux (WSL) available in the Microsoft Store for Windows 11 systems. WSL is the application that allows Windows users to run a GNU/Linux environment directly on Windows without the overhead of a virtual machine or dual-boot setup.One good aspect is that it installs as a separate app, decoupled from the OS. This means that users can update the app without having to wait for Windows OS updates to become available.Summarizing your command-line usage on Linux
The app in the Microsoft Store is not a new version of WSL. It’s still WSL 2, but is a preview version that was added as an option for end users to get the latest features faster and more conveniently. The binaries will no longer be part of the Windows image.To read this article in full, please click here
Microsoft has just made the Windows Subsystem for Linux (WSL) available in the Microsoft Store for Windows 11 systems. WSL is the application that allows Windows users to run a GNU/Linux environment directly on Windows without the overhead of a virtual machine or dual-boot setup.One good aspect is that it installs as a separate app, decoupled from the OS. This means that users can update the app without having to wait for Windows OS updates to become available.Summarizing your command-line usage on Linux
The app in the Microsoft Store is not a new version of WSL. It’s still WSL 2, but is a preview version that was added as an option for end users to get the latest features faster and more conveniently. The binaries will no longer be part of the Windows image.To read this article in full, please click here
Ever heard of Homebrew? It’s a package manager with a very unusual feature. It allows ordinary users to install packages without using sudo, and it’s available for both macOS and Linux. While the tool on each of these systems is referred to as Homebrew, the Linux version installs as linuxbrew.Once installed, users can use Homebrew via the brew command to install packages very easily. Installation of Homebrew itself, however, does generally require sudo privileges and installs in /home/linuxbrew.The man page for the brew command calls it “The Missing Package Manager for macOS (or Linux)”.To read this article in full, please click here
Ever heard of Homebrew? It’s a package manager with a very unusual feature. It allows ordinary users to install packages without using sudo, and it’s available for both macOS and Linux. While the tool on each of these systems is referred to as Homebrew, the Linux version installs as linuxbrew.Once installed, users can use Homebrew via the brew command to install packages very easily. Installation of Homebrew itself, however, does generally require sudo privileges and installs in /home/linuxbrew.The man page for the brew command calls it “The Missing Package Manager for macOS (or Linux)”.To read this article in full, please click here
Fedora Linux has been recognized as a "digital public good" by the Digital Public Goods Alliance (DPGA), a strategy group set up by UNICEF to promote sustainable development through open-source solutions that contribute to an equitable world.The reasons Fedora was recognized include that Fedora:
promotes best practices and adheres to standards
creates an innovative platform for hardware, clouds, and containers that enables software developers and community members to build tailored solutions for their users
is free of charge and comes with permissions to use, copy, modify, merge, publish, distribute, sublicense and/or sell copies of the software without restrictions other than that the same permissions must be granted to anyone using resulting products
adheres to privacy and other applicable international and domestic laws
shares personal information in limited and acknowledged ways
causes no harm
follows privacy policy guidelines and makes privacy policy available to partners
Finding installed packages on Fedora Linux systems
DPGA also notes that Fedora is actively used in 483 countries.To read this article in full, please click here
Fedora Linux has been recognized as a "digital public good" by the Digital Public Goods Alliance (DPGA), a strategy group set up by UNICEF to promote sustainable development through open-source solutions that contribute to an equitable world.The reasons Fedora was recognized include that Fedora:
promotes best practices and adheres to standards
creates an innovative platform for hardware, clouds, and containers that enables software developers and community members to build tailored solutions for their users
is free of charge and comes with permissions to use, copy, modify, merge, publish, distribute, sublicense and/or sell copies of the software without restrictions other than that the same permissions must be granted to anyone using resulting products
adheres to privacy and other applicable international and domestic laws
shares personal information in limited and acknowledged ways
causes no harm
follows privacy policy guidelines and makes privacy policy available to partners
Finding installed packages on Fedora Linux systems
DPGA also notes that Fedora is actively used in 483 countries.To read this article in full, please click here
The ethtool utility on Linux allows you to view and change some of your network-driver and interface-card settings, especially for wired devices. These include their speed, whether the interface uses auto-negotiation, and whether it runs in half- or full-duplex mode. Ethtool also provides an easy way to view or troubleshoot your network interface.More than likely, ethtool is already available on your Linux system. However, to check, you can use one or both of these commands:$ which ethtool
/usr/sbin/ethtool
$ sudo ethtool —version
ethtool version 5.13
To get a sense of how this utility can control settings, run a command like the one below. The -h means “help”. You’ll likely find yourself looking at 10 pages or so of syntax like what is shown here.To read this article in full, please click here
The ethtool utility on Linux allows you to view and change some of your network-driver and interface-card settings, especially for wired devices. These include their speed, whether the interface uses auto-negotiation, and whether it runs in half- or full-duplex mode. Ethtool also provides an easy way to view or troubleshoot your network interface.More than likely, ethtool is already available on your Linux system. However, to check, you can use one or both of these commands:$ which ethtool
/usr/sbin/ethtool
$ sudo ethtool —version
ethtool version 5.13
To get a sense of how this utility can control settings, run a command like the one below. The -h means “help”. You’ll likely find yourself looking at 10 pages or so of syntax like what is shown here.To read this article in full, please click here
Most of us don't often think about swap space unless we run into a problem on our systems that suggests we don't have enough. Even so, viewing and gauging the adequacy of swap space on a system is not overly complicated, and knowing what's normal for your system can help you spot when something is wrong. So let's check out some commands that can help you look into your swap space. But first, let's review some fundamentals.What swap space is and how it's used
Swap space is disk space that acts something like an extension of memory. It gets used when the system's physical memory (RAM) is full and the system needs more memory resources. It's called "swap" because the system will move some inactive pages in memory into the swap space so that it can accommodate more data in RAM. In other words, it provides a way to free up RAM on a busy system.To read this article in full, please click here
Most of us don't often think about swap space unless we run into a problem on our systems that suggests we don't have enough. Even so, viewing and gauging the adequacy of swap space on a system is not overly complicated, and knowing what's normal for your system can help you spot when something is wrong. So let's check out some commands that can help you look into your swap space. But first, let's review some fundamentals.What swap space is and how it's used
Swap space is disk space that acts something like an extension of memory. It gets used when the system's physical memory (RAM) is full and the system needs more memory resources. It's called "swap" because the system will move some inactive pages in memory into the swap space so that it can accommodate more data in RAM. In other words, it provides a way to free up RAM on a busy system.To read this article in full, please click here
The Linux sleep and wait commands allow you to run commands at a chosen pace or capture and display the exit status of a task after waiting for it to finish. Sleep simply inserts a timed pause between commands. Wait, on the other hand, waits until a process completes before notifying you that it has finished.Sleep
The sleep command pauses for a specified time. It’s generally used in a script, but works on the command line as well. In the example below, sleep pauses a minute between the two date commands.$ date; sleep 60; date
Wed Sep 8 12:10:40 PM EDT 2021
Wed Sep 8 12:11:40 PM EDT 2021
Summarizing your command-line usage on Linux
The sleep command takes the numeric argument as the number of seconds. You can, however, ask it to sleep for various amounts of time by adding another character to the argument:
1m = 1 minute
2h = 2 hours
3d = 3 days
$ date; sleep 1m; date
Wed Sep 8 12:16:38 PM EDT 2021
Wed Sep 8 12:17:38 PM EDT 2021
In fact, you can sleep for less than a second if you need.To read this article in full, please click here
The Linux sleep and wait commands allow you to run commands at a chosen pace or capture and display the exit status of a task after waiting for it to finish. Sleep simply inserts a timed pause between commands. Wait, on the other hand, waits until a process completes before notifying you that it has finished.Sleep
The sleep command pauses for a specified time. It’s generally used in a script, but works on the command line as well. In the example below, sleep pauses a minute between the two date commands.$ date; sleep 60; date
Wed Sep 8 12:10:40 PM EDT 2021
Wed Sep 8 12:11:40 PM EDT 2021
Summarizing your command-line usage on Linux
The sleep command takes the numeric argument as the number of seconds. You can, however, ask it to sleep for various amounts of time by adding another character to the argument:
1m = 1 minute
2h = 2 hours
3d = 3 days
$ date; sleep 1m; date
Wed Sep 8 12:16:38 PM EDT 2021
Wed Sep 8 12:17:38 PM EDT 2021
In fact, you can sleep for less than a second if you need.To read this article in full, please click here