Core Linux Commands for HPC

Lately, I’ve been thinking more about what’s happening in the world of HPC. The items that have risen to the top are the following:

  • During SC24 I had a few very enthusiastic people ask me how to get started in HPC or how I got started in HPC. Other people, such as Glen Lockwood had similar experiences.
  • Purdue University has been running a fantastic summer program to get undergraduate students involved in HPC and have found a large number of them are greatly affected by the experience, with some going into HPC as a career.
  • I knew a high school intern who was fantastic but didn’t know Linux when they started and had to be taught pretty much everything. With some guidance, they quickly conquered Linux and some Bash coding.

At the intersection of these observations, I started to think about what someone who wanted to get into HPC needed to know. I went back to basics and came up with some Linux command-line commands and ideas that someone starting out might need.

Lists and Lists … and Now My List

A lot of articles have titles such as “The Top 50 Linux commands you need to know.” You can replace “50” with almost any number you want. I’ve seen as few as 20 and as many as 60, but almost all of these articles come to Linux with a specific use case in mind. It could be database, or web usage, or coding, or computer-aided engineering (CAE), or any number of directions, but I haven’t really seen any lists for HPC. However, the intersection of these articles gave me a starting point for my ideas about core Linux commands for HPC.

Of course, the danger in publishing a list of Linux commands a user should know if they want to get into HPC is that absolutely everyone will disagree with the list. Some people might disagree with some of the commands being fundamental, whereas others might think that additional or different commands should be on the list. I expect this level of disagreement and welcome it, because it always opens up fun discussions (define “fun” however you like).

My list includes Linux commands that might directly translate into HPC, but ones I think a user should know (even an HPC admin). Before jumping into HPC commands and tools, I have two groups – (1) the “base” group and (2) the “secondary” group – that I will present in this article. The reason for the split is that the first group is oriented toward a single user on a desktop. The second group adds multiuser commands, as well as some networking, setting you up for HPC, which will be in a subsequent article.

Without further delay, you can see my base list in Table 1. I’ll start with these, but let me explain some of them and why.

Table 1: Base HPC Linux Commands
ls mkdir
cd rmdir
cp chmod
mv chown
rm head/tail
grep man
cat top
find uptime
pwd ps
date kill
more/less whereis
df which
du sudo

One of the first things you notice is that quite a few of these commands are all about file manipulation. Personally, I find this knowing how to navigate around a filesystem structure fundamental to Linux, including things like listing, copying, moving, and removing files; changing directories; looking at the content of a file, finding out where you are in the file structure. These things are also pretty common in the Windows world, although they generally use GUI tools. At least the user should understand the concept of directories, which are very similar to folders in Windows.

Further down the list, are commands to find out the load on the system, what’s running on the system, and how to stop a process, which leads to some understanding of what processes are run by root and what processes are run by users. Again, Windows and macOS have similar basic concepts: How can I get a list of what’s running? How can I kill a process? And so on.

A Text Editor

Beyond these basic commands are a couple of additional things I believe you should know before jumping into HPC and Linux, but they aren’t commands per se. The first is pretty simple: You should know a text-based editor (e.g., vi, Emacs, jed, or something similar). You don’t have to be an expert; I’ve used vi for more than 35 years only knowing a few commands. In the past I’ve written about the reasons for knowing a text-based editor, so I won’t dive in too deeply, but you will need to edit files and sometimes GUIs just don’t work correctly, or you can’t get a GUI remote session to a system.

Filesystem Concept

A second thing you should know is how the Linux system files are laid out. You should know what /, /bin/usr/usr/local/opt/home/var , and /var/logs  are. You don’t have to know the gory details of these directories, but having a general knowledge of what they are and why certain files are located there is important. You should definitely know where logs are kept (very important) and where many system configuration files are kept, as well.

While studying the directory layout in Linux and where files are located, you should realize that sometimes the layout is violated. For Linux itself, it’s almost totally sane, in that files and tools are where they should be, but it may not be obvious. You might question why one file isn’t located where you think, but if you search a bit more you should be able to find an explanation. If you can’t, just accept it and move on.

But you will see people use /usr/local  and /opt  interchangeably, and I think the HPC world has accepted that for the most part. These locations usually hold packages or tools that are shared across a cluster, so you don’t have to install a copy on each node in the cluster. Some people will argue about the observation, and when it comes down to it, the argument is correct, but people still violate the arrangement. Think of it as people misusing words or phrases in the English language. For example, I never think of “defense” as a verb, but many people use it that way.

Secondary Group

The previous list of base commands is a good way to get started, but I think a secondary group should be studied before moving on to HPC-specific tools and commands. These more advanced commands or tools mentioned in this group are more concerned with a multiuser (Table 2) and networking environment.

Table 2: Secondary Multiuser HPC Linux Commands
touch usermod
clear groupadd
tar groupmod
gzip /gunzip  (in the parallel world, pigz ) groupdel
ssh systemctl
scp uname
useradd hostname
passwd watch
userdel  

The commands in Table 2 are good to know, although some might disagree with simple commands such as touch  or clear , but I use these for various reasons when working with clusters. Notice that some of the commands are again focused on file manipulation (e.g., tar  and gzip ). Other commands are focused on remote system access (e.g., ssh  and scp ).

A third group of commands handles user management in a multiuser system. They address how to create a user, change their password, modify the user’s account in some way, and delete a user. Group manipulation has similar commands.

The systemctl  command is, I would argue, critical when moving into HPC. This tool allows you to manage systemd services by installing and starting software, particularly HPC software, enabling it to start when the system reboots, stopping the service, and checking on the status of that service. You should not skip over this command, although you might not use it right away.

The last set of commands, which I’m sure will be controversial, revolve around networking (Table 3). The idea is to start understanding the basics of networking and a few commands on how to check on various aspects.

Table 3: Secondary Networking HPC Linux Commands
ping
traceroute
hostname
nslookup
ip  (but perhaps not all options)
    ip addr show
    ip link

With these commands, the goal is not to become a networking specialist but, rather, to have a basic understanding of networking on a host (e.g., understanding what an IP address is and how to check it on the system). If you cannot connect to another system, for example, use tools such as ping  or traceroute  to begin to understand why. You don’t have to pass a sysadmin networking test at this point. Just know a few things, because you can always search for other commands to solve a problem.

Summary

I’ve been seeing more and more people getting excited about HPC and wanting to learn the tools and commands to participate. Many times, they want to build their own home system, which means they are becoming beginning system administrators. I want to help them get started, so I always recommend Linux, either in a dedicated desktop or laptop or in a virtual machine; then, they should start learning more and more about Linux before jumping into HPC.

This article is about what I think are the base commands someone should know, as well as some secondary commands that might not be that useful to just one person using Linux. These commands should server as a good foundation for jumping into HPC. People will disagree about the lists and this generates good discussion. I’m not willing to say these lists cannot be tweaked, but it’s a starting point.

I don’t want to exist in an echo chamber, so I would love to hear people’s comments. Are some commands not really needed? Are some needed commands missing? It appears that a good chunk of the HPC social exchange has moved to Bluesky, so post there with #HPC . I think everyone would benefit from your ideas and comments.

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=