Learn how to use a host of Linux commands in these 2-minute video tutorials from Sandra Henry-Stocker, author of the Unix as a Second Language blog.
In this Linux tip, we’re going to look at the zipcloak command that you can use to encrypt a zip file so that it is password-protected.
In this Linux tip, we’re going to look the tr command (translate) that is used to replace or remove characters in strings or files.
In this Linux tip, we’re going to look at the whatis command. It’s a helpful command that will give you a one-line description of any command that you ask about.
In this Linux tip, we’re going to look at a bash option that will cause a script to exit any time it encounters an error. It’s called “errexit."
In this Linux tip, we’re going to examine bash's continue command. It is a bash built-in and provides a way to stop executing the commands in a loop depending on some condition.
In this Linux tip, we’re going to examine bash’s break command. It is a bash built-in and provides a way to break out of a loop prematurely.
In this Linux tip, we’ll explore how to use single and double quotes on the Linux command line or in scripts.
In this Linux tip, we’ll explore some ways you can check the status of files using the if command.
In this Linux tip, we’re going to look into several uses of the cd command. While it’s routinely used to move into a different directory, there are some more unusual ways to use this command.
The yes command provides a stream of output for you – a single “y” on every line by default – and it moves very quickly down your screen.
The which command tells you where the command executable being asked about is stored on your system, and the whereis command shows you that information and more.
Figlet allows you to display messages using very large letters in a terminal window on Linux.
In this Linux tip, we’re going to work with the eval command. It’s a bash built-in that can run a variable as a command. This means that you can set up a complex command by saving it as a variable and then run it using eval. Doing this can be very convenient when you’re creating a complex command.
While fold is generally used to break long lines of text into shorter lines, it can also provide the arguments to drive a loop.
This trick works because Linux stores dates/times as the number of seconds since Jan 1, 1970. This doesn’t mean you can’t look at earlier dates; the earlier dates are simply stored as negative numbers.
In this Linux tip, we’re going to look at how to repeat commands using !! or the up-arrow key on your keyboard. Any time you want to rerun previous commands on the Linux command line, these tricks make it easier to run the command again.
In this Linux tip, we’re going to look into the ip a command. It’s one that provides details on your network connection. If you want to type some additional letters, you can enter the command ip address instead, but the results will be the same.
In this Linux tip, we’re going to take a look at htop – a very useful command-line tool for looking into system performance and nailing down the cause of system slowdowns.
In this Linux tip, learn several ways to extract substrings on Linux.
In this Linux tip, learn how you can use the grep command to cheat when you play Wordle. Linux systems can be very helpful in this because of the many commands it provides and the fact that it includes a lengthy words file.
In this Linux tip, learn how to use the strace and ltrace commands. They provide information on the system and library calls that a Linux process makes and this information can help when you're troubleshooting a process that's not behaving as you'd expect.
In this Linux tip, we’re going to look at a simple way to set up a quick function that allows you to run calculations a lot more easily than usual.
In this Linux tip, we’re going to look at the && (AND) and || (OR) operators and how they can be used.
In this Linux tip, we look at an awk command that you can use to remove duplicate lines from text files – even when those lines aren't consecutive.
In this Linux tip, we’re going to look at the btrfsck command. It provides file system checking for btrfs file systems – sometimes referred to as the "better" file systems, but actually named for its B-tree underpinnings.
In this Linux tip, we’re going to look at using the date command to run tests. You can always use the date command to see what day it is, but you can also use it in scripts to test what time, day of the month or month of the year it is (and a lot of other things too).
In this Linux tip, we’re going to look at clamav. It's a free and open source tool that lets you scan for viruses on Linux.
In this Linux tip, we’re going to look at the expand command. It's used to replace tabs in text files with space characters (sometimes referred to as "blanks").
In this Linux tip, we’re going to look at the seq (sequence) command. It provides a very easy way to generate a sequence of numbers and gives you a lot of control.
In this Linux tip, learn how to use the true and false commands. What they do is very simple. The true command generates an exit code of 0 (no problems) and the false command generates a value of 1.
In this Linux tip, learn how to use the fold command. It allows you to limit the length of lines when displaying a text file by "folding" long lines into smaller pieces and, of course, you can save the shortened lines into another file.
In this Linux tip, learn how to use the csplit command. It's a command that lets you split a file into pieces based on its content. For example, you might separate a file based on chapter headings, dates or content separators of some kind. Think of "csplit" as meaning "context split."
In this Linux tip, learn how to use the nethogs command. As the name implies, nethogs will display information on how much processes using or "hogging" your network bandwidth.
In this Linux tip, learn how to use the whois command. It sends requests to what are called WHOIS servers. These servers maintain numerous details on domain registrations. So, when you ask about a particular domain, you get a pile of details.
In this Linux tip, learn how to use the dmesg command. It's a command that displays the content of the kernel message buffer – messages that were sent by various system services such as device drivers. You can view a lot of information that you would normally not see and get insights into how your system is working.
In this Linux tip, learn how to use the free command. It doesn't mean a command that you are not paying for, but one that tells you how much memory – physical and swap – is being used on your Linux system including how much is "free" and how much is available.
In this Linux tip, learn how to use the bpytop command. It's one of many "top" commands (like top and htop) that make it easy to gauge many aspects of system performance on Linux.
In this Linux tip, learn how to use the cheat command. It provides what have come to be called "cheat sheets" on a huge assortment of Linux commands. Once installed, all you have to do is type "cheat" followed by the name of the command for which you want to see sample commands.
In this Linux tip, learn how to use the xargs command. It accepts input that is piped to it and then uses that input as arguments to whatever command you specify.
In this Linux tip, learn how to add comments to your scripts. It's a super easy thing to do and can make it a lot easier for you or someone else to figure out what your script is intended to do – especially if the script is complex or you haven't looked at it in a long time.
In this Linux tip, learn how to use the sar command. The name "sar" stands for "system activity report". It provides details on all aspects of system performance including system load, CPU usage, memory use, paging, swapping, disk usage, device load, network activity and so on.
In this Linux tip, learn how to use the wait command. It's a command that allows you to wait for a process running in the background to finish before you move on to the next command.
In this Linux tip, learn how to use the sleep command. The sleep command introduces a pause on the command line or in a script.
In this Linux tip, learn how to use the export command. It's a bash built-in that allows command line variables to be available to a child process – a second shell or a script that you run.
In this Linux tip, you'll learn two checksum commands -- one that provides an easy way to compare a copy of a file to the original, and one that computes a 256-bit checksum that is cryptographically secure.
In this Linux tip, learn an easy way to do math on the command line using double parentheses. This construct is often used in scripts, but also works just fine on the command line.
In this Linux tip, learn how to use the shuf command -- short for “shuffle”. It randomly rearranges lines from a file or output that is sent to it.
In this Linux tip, learn how to use the nl command. It stands for “number lines” and it does just that.
In this Linux tip, learn how easy it is to install Apache on Fedora. The first thing you need to do is run a command to install the software. Then, you can run other commands to ensure it starts when your system reboots, to view Apache processes, to uninstall it and more.
In this Linux tip, learn how to ask a Linux command for help. You can type the command you want to know about and then add --help. What the command should send back is an explanation of the command's options, maybe a usage example and something about the exit status.