Skip to content

Linux basics ​

The login and compute nodes primarily use Linux command-line environments. Learn paths, navigation, file inspection, permissions, and text editing before uploading data and submitting jobs.

TopicPurpose
Paths and directoriesLocate data, scripts, and results
File viewingInspect inputs and logs
Copying and movingOrganize projects and backups
ArchivesTransfer datasets and archive results
PermissionsCheck read, write, and execute access
Text editingUpdate scripts and configuration
Processes and resourcesCheck running programs and disk space

Home directory ​

Your login shell normally starts in your home directory, represented by ~:

bash
cd ~
pwd

pwd prints the current directory.

Paths ​

An absolute path starts at /, for example /home/user/project. A relative path starts from the current directory, for example data/input.txt. . denotes the current directory; .. denotes its parent.

Command structure ​

Commands consist of a command name, options, and arguments. In the original notation below, the three terms mean command, options, and arguments:

bash
命令 选项 参数

Example:

bash
ls -lh data

Here ls is the command, -lh supplies options, and data is the target directory.

Suggested learning order ​

  1. pwd, ls, cd: navigation.
  2. mkdir, cp, mv, rm: file organization.
  3. cat, less, head, tail: inspect contents.
  4. chmod, du, df, ps: permissions, storage, and processes.
  5. nano or vim: edit scripts.

See Common commands, On-site access, Off-site access, and Slurm.

Copyright 2021 Biodesign Center. All rights reserved.