{"id":13453734,"url":"https://github.com/0nn0/terminal-mac-cheatsheet","last_synced_at":"2025-12-18T12:18:12.780Z","repository":{"id":2213260,"uuid":"3162600","full_name":"0nn0/terminal-mac-cheatsheet","owner":"0nn0","description":"List of my most used commands and shortcuts in the terminal for Mac","archived":false,"fork":false,"pushed_at":"2024-05-17T14:36:20.000Z","size":143,"stargazers_count":7110,"open_issues_count":7,"forks_count":1954,"subscribers_count":265,"default_branch":"master","last_synced_at":"2024-10-28T20:39:34.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0nn0.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-01-12T14:12:15.000Z","updated_at":"2024-10-28T16:32:38.000Z","dependencies_parsed_at":"2022-07-09T11:16:06.349Z","dependency_job_id":"fa234560-324a-4bf4-91fe-b7e479d7dcd1","html_url":"https://github.com/0nn0/terminal-mac-cheatsheet","commit_stats":{"total_commits":122,"total_committers":37,"mean_commits":"3.2972972972972974","dds":0.7295081967213115,"last_synced_commit":"8e2ff13f83e5e408ae1f902e360753ed87802f99"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0nn0%2Fterminal-mac-cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0nn0%2Fterminal-mac-cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0nn0%2Fterminal-mac-cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0nn0%2Fterminal-mac-cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0nn0","download_url":"https://codeload.github.com/0nn0/terminal-mac-cheatsheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245194290,"owners_count":20575737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:46.226Z","updated_at":"2025-12-18T12:18:07.729Z","avatar_url":"https://github.com/0nn0.png","language":null,"funding_links":[],"categories":["Others","Shell","Tools"],"sub_categories":[],"readme":"# Terminal Cheatsheet for Mac (Basics)\n\nThis cheatsheet is available in many languages. Since the translation rely on volunteers, the content between the available languages may vary. Choose one below:\n\n- [English Version](#english-version)\n- [Version en Español](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Español)\n- [Version Française](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Français)\n- [Wersja Polska](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Polskie)\n- [Versão em Português](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Português)\n- [Versioni Shqip](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Shqiptar)\n- [Phiên bản Tiếng Việt](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Tiếng%20Việt)\n- [Türkçe Versiyonu](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Türk)\n- [Русская Версия](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Русский)\n- [Українська Версія](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Українська)\n- [한국어판](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/한국어)\n- [中文版](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/中文)\n- [日本語](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/日本語)\n- [繁體中文版](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/繁體中文)\n- [Bahasa Indonesia](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Indonesia)\n- [Deutsch](https://github.com/0nn0/terminal-mac-cheatsheet/tree/master/Deutsch)\n\n## English Version\n\n_Letters are shown capitalized for readability only._  _Capslock should be off._\n\n------------\n\n### SHORTCUTS\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| Ctrl + A   | Go to the beginning of the line you are currently typing on.  This also works for most text input fields system wide.  Netbeans being one exception |\n| Ctrl + E   | Go to the end of the line you are currently typing on.  This also works for most text input fields system wide.  Netbeans being one exception |\n| Ctrl + L   | Clears the Screen |\n| Cmd + K    | Clears the Screen |\n| Ctrl + U   | Cut everything backwards to beginning of line |\n| Ctrl + K   | Cut everything forward to end of line |\n| Ctrl + W   | Cut one word backwards using white space as delimiter |\n| Ctrl + Y   | Paste whatever was cut by the last cut command |\n| Ctrl + H   | Same as backspace |\n| Ctrl + C   | Kill whatever you are running.  Also clears everything on current line |\n| Ctrl + D   | Exit the current shell when no process is running, or send EOF to a the running process |\n| Ctrl + Z   | Puts whatever you are running into a suspended background process. fg restores it |\n| Ctrl + _   | Undo the last command. (Underscore.  So it's actually Ctrl + Shift + minus) |\n| Ctrl + T   | Swap the last two characters before the cursor |\n| Ctrl + F   | Move cursor one character forward |\n| Ctrl + B   | Move cursor one character backward |\n| Option + →  | Move cursor one word forward |\n| Option + ←  | Move cursor one word backward |\n| Esc + T  | Swap the last two words before the cursor |\n| Esc + Backspace | Cut one word backwards using none alphabetic characters as delimiters |\n| Tab  | Auto-complete files and folder names |\n\n### CORE COMMANDS\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| cd [folder] | Change directory e.g. `cd Documents` |\n| cd |  Home directory |\n| cd ~ |  Home directory |\n| cd /  | Root of drive |\n| cd -  | Previous directory |\n| ls | Short listing |\n| ls -l | Long listing |\n| ls -a | Listing incl. hidden files |\n| ls -lh| Long listing with Human readable file sizes |\n| ls -R | Entire content of folder recursively |\n| sudo [command] | Run command with the security privileges of the superuser (Super User DO) |\n| open [file] | Opens a file ( as if you double clicked it ) |\n| top | Displays active processes. Press q to quit |\n| nano [file] | Opens the file using the nano editor |\n| vim [file] | Opens the file using the vim editor |\n| clear |  Clears the screen |\n| reset |  Resets the terminal display |\n\n### CHAINING COMMANDS\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| [command-a]; [command-b] | Run command A and then B, regardless of success of A |\n| [command-a] \u0026\u0026 [command-b] | Run command B if A succeeded |\n| [command-a] \\|\\| [command-b] | Run command B if A failed |\n| [command-a] \u0026 | Run command A in background |\n\n\n### PIPING COMMANDS\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| [command-a] \\| [command-b] | Run command A and then pass the result to command B e.g ps auxwww \\| grep google |\n\n\n### COMMAND HISTORY\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| history n |  Shows the stuff typed – add a number to limit the last n items |\n| Ctrl + r  | Interactively search through previously typed commands |\n| ![value] |  Execute the last command typed that starts with ‘value’ |\n| ![value]:p |  Print to the console the last command typed that starts with ‘value’ |\n| !! |  Execute the last command typed |\n| !!:p |  Print to the console the last command typed |\n\n### FILE MANAGEMENT\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| touch [file] |   Create a new file |\n| pwd | Full path to working directory |\n| . |  Current folder, e.g. `ls .` |\n| .. | Parent/enclosing directory, e.g. `ls ..` |\n| ls -l .. | Long listing of parent directory |\n| cd ../../ | Move 2 levels up |\n| cat | Concatenate to screen |\n| rm [file] |  Remove a file, e.g. `rm data.tmp` |\n| rm -i [file] | Remove with confirmation |\n| rm -r [dir] | Remove a directory and contents |\n| rm -f [file] | Force removal without confirmation |\n| cp [file] [newfile] | Copy file to file |\n| cp [file] [dir] | Copy file to directory |\n| mv [file] [new filename] |  Move/Rename, e.g. `mv file1.ad /tmp` |\n| pbcopy \u003c [file] | Copies file contents to clipboard |\n| pbpaste | Paste clipboard contents |\n| pbpaste \u003e [file] | Paste clipboard contents into file, `pbpaste \u003e paste-test.txt` |\n\n### DIRECTORY MANAGEMENT\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| mkdir [dir] | Create new directory |\n| mkdir -p [dir]/[dir] |  Create nested directories |\n| rmdir [dir] | Remove directory ( only operates on empty directories ) |\n| rm -R [dir] | Remove directory and contents |\n| less [file]|  Output file content delivered in screensize chunks |\n| [command] \u003e [file] |  Push output to file, keep in mind it will get overwritten |\n| [command] \u003e\u003e [file] | Append output to existing file |\n| [command] \u003c [file] |  Tell command to read content from a file |\n\n### SEARCH\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| find [dir] -name [search_pattern] | Search for files, e.g. `find /Users -name \"file.txt\"` |\n| grep [search_pattern] [file] | Search for all lines that contain the pattern, e.g. `grep \"Tom\" file.txt` |\n| grep -r [search_pattern] [dir] | Recursively search in all files in specified directory for all lines that contain the pattern |\n| grep -v [search_pattern] [file] | Search for all lines that do NOT contain the pattern |\n| grep -i [search_pattern] [file] | Search for all lines that contain the case-insensitive pattern |\n| mdfind [search_pattern] | Spotlight search for files (names, content, other metadata), e.g. `mdfind skateboard` |\n| mdfind -onlyin [dir] -name [pattern] | Spotlight search for files named like pattern in the given directory |\n\n### HELP\n\n| Key/Command | Description |\n| ----------- | ----------- |\n| [command] -h |  Offers help |\n| [command] --help | Offers help |\n| info [command] | Offers help |\n| man [command] |  Show the help manual for [command] |\n| whatis [command] | Gives a one-line description of [command] |\n| apropos [search-pattern] | Searches for command with keywords in description |\n\n### GIT\n\nFor Git related commmands you can check my [git-basics-cheatsheet](https://github.com/0nn0/git-basics-cheatsheet)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0nn0%2Fterminal-mac-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0nn0%2Fterminal-mac-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0nn0%2Fterminal-mac-cheatsheet/lists"}