A list of simple Linux command references
Basic Linux (Bash) Commands
Below is a list of basic Linux commands that one may use almost any Linux machine. For these commands any_directory will represent an arbitrary directory, and for any file or directory, you may choose to do a file in your current directory, or choose a file in a different directory.
- List the contents of the directory at any_directory (leave blank for current directory)
- Change to directory at any_directory
- Output the absolute path to your current directory
cp source_file destination_file
- Copy source_file to the destination_file (this can be used to make backups, or copy it to a different location)
cp -r source_directory destination_directory
- Copy source_directory to the destination_directory (note the only difference is the "-r" for "recursive")
- Remove (delete) the file called file_to_be_removed
rm -rf directory_to_be_removed
- Remove (delete) the directory called directory_to_be_removed
- Make (create) the directory called directory_name
- Remove (delete) the directory called directory_name
- Output the contents of file file_name to the standard output (console)
- View the contents of file file_name with pagination
- Output just the beginning of file file_name to the standard output (console)
- Output just the end of file file_name to the standard output (console)
- Edit the file file_name using Nano (an easier-to-learn text editor)
- Edit the file file_name using vi (a powerful text editor that is more difficult to learn)
Cluster Specific Commands
A list of Commands that you will use on ARCC clusters, but not necessarily on any Linux machine
sreport cluster AccountUtilizationByUser -t hourper End=`date +"%m/%d-%R"` | grep "your_account_name"
- Output the monthly hours used and the total percentage of the limits on account your_account_name in hours
sreport cluster AccountUtilizationByUser -t minper End=`date +"%m/%d-%R"` | grep "your_account_name"
- Output the monthly hours used and the total percentage of the limits on account your_account_name in minutes
sacctmgr show qos "your_account_name"
- Output the monthly limit on account your_account_name in minutes
sinfo -o "%15N %10c %10m %25f %10G"
- Output a list of different node groupings and their associated features (useful for Newton)
- Output the storage space limits for your account
- Submit the job with the submission script file named submit_script
srun --pty bash
- Start an interactive session with all the default settings
- Cancel or end job with the Job ID job_number
squeue -u `whoami`
- Check the status of all of your jobs
scontrol show jobid job_number
- Output more detailed information about the job with Job ID job_number
- Check the status of all jobs in the queues