Skip to content

Instantly share code, notes, and snippets.

@98chimp
Created March 9, 2015 19:10
Show Gist options
  • Save 98chimp/4550d9d7c685b8c1a0be to your computer and use it in GitHub Desktop.
Save 98chimp/4550d9d7c685b8c1a0be to your computer and use it in GitHub Desktop.
pwd: print working directory - Return working directory name
cd ~/: functionally the same as the command cd /home/username
ls -al: list files including hidden ones in long format
echo hello world: prints the phrase "hello world" on the screen
print: prints the current date and time (e.g., Mon 9 Mar 2015 11:33:03 PDT)
hostname: prints the current host name on the screen (e.g., Joojeh.local)
arch: outputs the underlying architecture
uname -a: Displays system information (e.g., Darwin Joojeh.local 14.3.0 Darwin Kernel Version 14.3.0: Thu Feb 12 18:38:33 PST 2015; root:xnu-2782.20.34~3/RELEASE_X86_64 x86_64)
uptime: The length of time a user can work on a computer or network without interruption (e.g., 11:51 up 23:22, 2 users, load averages: 4.27 4.46 4.40)
whoami: an existential question that has perplexed philosophers and scientists from the dawn of consciousness (e.g., Q. who am I? A.98% chimp!); this command also prints the username associated with the current effective user ID (e.g., shahin)
id: prints the user or group identifier of the account by which the program is executed (uid=501(shahin) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),80(admin),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh),401(com.apple.sharepoint.group.1))
last: searches back through the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created
ps aux: lists all the running processes from all users
top: provides an ongoing look at processor activity in real time
man "automatic door":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment