Skip to main content
U.S. flag

An official website of the United States government

Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Https

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Linux introduction

man command - Show manual for command
pwd - Output the current directory that you are in
ls - List the content of the current directory

ls -a - List all the content, including hidden files
ls -l - List the content and its information

mkdir foldername – Create a new folder foldername
cd foldername – Change the working directory to foldername

cd - Return to the $Home directory
cd .. - Go up a directory
cd - - Return to the previous directory

emacs, nano, vi – Editors
cp sourcedestination – Copy source to destination

cp -r sourcedestination – Copy a folder recursively fromsource to destination

mv source destination - Move (or rename) a file from source to destination
rm file1 - Remove file1

rm -r folder - Remove a folder and its content recursively

cat file – Print contents offileon the screen
less file - View and paginate file
head file - Show first 10 lines of file
tail file - Show last 10 lines of file

history – Show the list of commands issued earlier
!commandnumber – Reissue command number commandnumber

lfs quota –g firstname.lastname/scinet01 – Showsusage and quota on firstname.lastnamehome directory
module avail – Show all available software modules
module loadmodulename – Loadmodule modulenamein your environment
module unloadmodulename - Unloadmodule modulenamefromyour environment
module list – Listall modules currently loaded in your environment
module helpmodulename – Showinformation about module modulename
module purge – Unloadall modules fromyour environment
salloc – Request 2 logical coreson a regular compute node
exit – Close session (should be used to close interactive session)
sbatch jobscript – Submit jobscriptinto queue
squeue – Show all the jobs currently running or waiting in the queue
sinfo – Show available partitions (queues)
scancel jobnumber – Cancel job jobnum