Linux Commands

Get familiar with the environment

Listing some useful ones:

ā€¢ id: know yourself

ā€¢ w: who is logged in (-f to find where they are logging in from)

ā€¢ lsblk: list block storage devices ā€¢ lscpu: display info about the CPUs

ā€¢ lstopo: display hardware topology (need hwloc, hwloc-gui packages)

ā€¢ free: free and used memory (try free -g)

Command Navigation

ā€¢ lsb_release: distribution info (try -a)

Be nice and fly under the radar, eg.: nice -n 19 tar cvzf archive.tgz large_dir

Saving some time and hair follicles

!! repeats the last command

ā€¢ !$ change command keep last argument: ā€¢ cat states.txt # file too long to fit screen ā€¢ less !$ #reopen it with less

ā€¢ !* change command keep all arguments: ā€¢ head states.txt | grep '^Al' #should be tail ā€¢ tail !* #no need to type the rest of the command

Find Command

Find Command Structure

Scheduling Tasks

Anatomy of crontab entry

Source: Linux Productivity Tools (2019) [pdf]ā€‹