If you are a beginner in computational materials science and have never encountered the Linux system before, this article is perfect for you! It will help you quickly get started. The main content includes: (1) Why use Linux; (2) Common versions of the Linux system; (3) Common Bash commands; (4) Remote connection and file transfer.
When it comes to operating systems, many people first think of Windows or macOS, but in fields such as servers and development environments, the Linux system occupies an important position due to its open-source, stable, and secure characteristics. For learners in the field of computational materials science, mastering the basic operations of Linux is an essential first step. If you are a newcomer to Linux, this article will guide you to quickly grasp the basic operational knowledge and take the first step in practical computational materials science!
01
—
Why Use Linux
In computational materials science, we often need to perform large-scale scientific calculations, such as first-principles calculations (DFT) and molecular dynamics simulations (MD). These calculations typically require powerful computing resources, and a single personal computer is often insufficient. Therefore, we usually run these tasks on high-performance computing (HPC) clusters.
The Linux system, due to its stability, efficiency, and good support for command-line operations, has become the preferred operating system for HPC clusters. Almost all computational materials science software, such as VASP, LAMMPS, Quantum ESPRESSO, etc., is developed and run in a Linux environment. Mastering Linux commands not only allows you to easily submit and manage computational tasks on the cluster but also helps you better understand and debug various computational software.
02
—
Common Versions of Linux
Linux has many distributions, each optimized for different scenarios, and beginners can choose based on their needs:
– Ubuntu: One of the most beginner-friendly versions, with a user-friendly interface and strong community support, suitable for personal desktops and development environments.
– CentOS: Based on Red Hat Enterprise Linux (RHEL), known for its high stability, widely used in the server field, but has been gradually replaced by AlmaLinux and Rocky Linux in recent years.
– Debian: Known for its stability and open-source purity, it serves as the foundation for many other distributions (like Ubuntu) and is suitable for users seeking extreme stability.
– Fedora: Sponsored by Red Hat, it updates quickly and includes the latest open-source technologies, suitable for developers and tech enthusiasts.
– Arch Linux: Lightweight and flexible, it uses a rolling update model and requires more manual configuration, suitable for users willing to delve deeper into Linux.

03
—
Common Bash Commands
Bash is the most commonly used command-line interpreter in Linux systems. Mastering these basic commands will allow you to operate the system efficiently:
-
File and Directory Operations
– ls: Lists files and directories in the current directory; ls -l shows detailed information, and ls -a includes hidden files.
– cd [directory name]: Switches directories; cd ~ returns to the user’s home directory, and cd .. goes back to the previous directory.
– pwd: Displays the path of the current directory.
– mkdir [directory name]: Creates a new directory; mkdir -p a/b can create multiple levels of directories at once.
– rm [file name]: Deletes a file; rm -r [directory name] deletes a directory (use with caution, as recovery is difficult after deletion).
– cp [source file] [destination path]: Copies a file; cp -r copies a directory.
– mv [source file] [destination path]: Moves a file or renames it; for example, mv file1.txt file2.txt renames the file.
-
System Information and Management
– uname -a: Views system kernel version and other information.
– df -h: Displays disk space usage; -h means to show in human-readable units (like GB).
– top: Real-time view of system processes and resource usage (press q to exit).
– ps aux: Lists currently running processes. File content viewing
– cat [file name]: Views the entire content of a file.
– less [file name]: Views file content page by page (press space to scroll, q to exit).
– grep [keyword] [file name]: Searches for keywords in a file; for example, grep “error” log.txt.
04
—
Remote Connection and File Transfer
In practical work, we often need to remotely operate Linux servers. Here are some commonly used tools and commands:
Remote Connection– SSH: The most commonly used remote connection protocol, with the command format ssh username@serverIP, for example
ssh [email protected]
On the first connection, you will be prompted to confirm, and after entering the password, you can log in (the password will not be displayed on the screen, nor will it show “*” or dots; just enter it completely). Some servers may use key-based login for added security.– Recommended tools: Windows users can use MobaXterm, PuTTY, Xshell; macOS and Linux have built-in terminals that directly support SSH commands, and graphical tools like FinalShell are also very convenient.File Transfer– SCP: A file transfer command based on SSH; to upload a file, use scp local file path username@serverIP:destination path, for example:
scp local.txt [email protected]:/home/scp [email protected]:/home/file.txt ./
– SFTP: An interactive file transfer tool; after logging in with ftp username@serverIP, you can use commands like put (upload) and get (download).– Recommended tool: FileZilla is a cross-platform graphical SFTP tool that is easy to use and suitable for beginners.
05
—
Conclusion
Although the learning curve for Linux is slightly higher than for graphical systems, mastering it can greatly enhance work efficiency. Start by familiarizing yourself with common commands and gradually practice; you will discover the power of Linux. If you have specific operational questions, feel free to discuss them in the comments!

Wishing you all the best
[Note]: The author has limited knowledge; if there are any errors, please contact for corrections; if there is any infringement, please contact for deletion!