On a Macintosh computer, many of the commands at the terminal are similar to those on Linux systems since macOS is based on a Unix derivative called Darwin. Here are some common commands and examples for Mac users:

  1. ls – List directory contents.
   ls
  1. cd – Change the current directory.
   cd ~/Documents
  1. pwd – Print the working directory.
   pwd
  1. mkdir – Create a new directory.
   mkdir new_directory
  1. rmdir – Remove a directory.
   rmdir new_directory
  1. touch – Create a new, empty file.
   touch new_file.txt
  1. rm – Remove files or directories.
   rm new_file.txt
  1. cp – Copy files or directories.
   cp source_file.txt destination_file.txt
  1. mv – Move or rename files or directories.
   mv old_name.txt new_name.txt
  1. cat – Concatenate and display file content. cat file.txt
  2. more or less – Display file content page by page. less file.txt
  3. head – Display the beginning of a file. head file.txt
  4. tail – Display the end of a file. tail file.txt
  5. find – Search for files in a directory hierarchy. find . -name "*.txt"
  6. grep – Search text using patterns. grep "search_term" file.txt
  7. open – Open files, directories, or URLs. open .
  8. kill – Terminate processes. kill 12345 # Where 12345 is the process ID
  9. ps – Report a snapshot of current processes. ps -ef
  10. sudo – Execute a command as another user (typically the superuser). sudo nano /etc/hosts
  11. man – Display the manual page for a command.
    bash man ls

These commands will help users navigate the filesystem, manage files and directories, view and search file content, manage processes, and obtain help while using the Terminal on a Macintosh computer.


  1. which – Shows the full path of shell commands. which ls
  2. who – Show who is logged on. who
  3. whoami – Print the user name associated with the current effective user ID. whoami
  4. uptime – Tell how long the system has been running. uptime
  5. df – Report file system disk space usage. df -h
  6. du – Estimate file space usage. du -sh *
  7. top – Display dynamic real-time view of a running system. top
  8. clear – Clear the terminal screen. clear
  9. history – Display the command history. history
  10. date – Display or set the system date and time. date
  11. cal – Display a calendar. cal
  12. env – Display, set, or remove environment variables. env
  13. export – Set an environment variable. export VAR_NAME=value
  14. unset – Unset an environment variable. unset VAR_NAME
  15. alias – Create an alias for a command. alias ll='ls -la'
  16. unalias – Remove an alias. unalias ll
  17. curl – Transfer data from or to a server. curl http://example.com
  18. wget – Non-interactive network downloader. wget http://example.com/file.txt
  19. ssh – OpenSSH SSH client (remote login program). ssh username@hostname
  20. scp – Secure copy (remote file copy program).
    bash scp file.txt username@hostname:/path

These additional commands cover a wide range of functionalities from managing environment variables, viewing system information, managing network connections, and much more. By mastering these commands, users can greatly enhance their efficiency and capability in handling various tasks on a Macintosh computer.


  1. ping – Test the reachability of a network host. ping google.com
  2. traceroute – Print the route packets take to a network host. traceroute google.com
  3. netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. netstat -an
  4. ifconfig – Configure network interface parameters. ifconfig
  5. nslookup – Query Internet name servers interactively. nslookup google.com
  6. dig – DNS lookup utility. dig google.com
  7. ftp – FTP client. ftp ftp.example.com
  8. sftp – Secure file transfer program. sftp username@hostname
  9. nano – Nano’s ANOther editor, an enhanced free Pico clone (text editor). nano file.txt
  10. vim – Vi IMproved, a programmers text editor. vim file.txt
  11. chmod – Change file modes or Access Control Lists. chmod 755 file.txt
  12. chown – Change file owner and group. chown username:groupname file.txt
  13. chflags – Change file flags. chflags uchg file.txt
  14. tar – Archive utility. tar -cvf archive.tar /path/to/directory
  15. gzip – Compress or expand files. gzip file.txt
  16. gunzip – Decompress files. gunzip file.txt.gz
  17. zip – Package and compress (archive) files. zip archive.zip file.txt
  18. unzip – List, test and extract compressed files in a ZIP archive. unzip archive.zip
  19. screen – Terminal multiplexer with VT100/ANSI terminal emulation. screen
  20. tmux – Terminal multiplexer.
    bash tmux

These commands help in network troubleshooting, file and directory permission management, text editing, file compression and archiving, and managing multiple terminal sessions among others. They are beneficial for system administration, network management, and everyday usage.


  1. kill – Terminate or signal a process. kill 12345 # where 12345 is the process ID
  2. ps – Report a snapshot of the current processes. ps aux
  3. pgrep – Look up or signal processes based on name and other attributes. pgrep -l bash
  4. pkill – Signal processes based on name and other attributes. pkill bash
  5. lsof – List open files. lsof
  6. grep – Print lines that match patterns. grep "pattern" filename
  7. find – Search for files in a directory hierarchy. find /path/to/directory -name filename
  8. awk – Pattern scanning and processing language. awk '{print $1}' filename
  9. sed – Stream editor for filtering and transforming text. sed 's/old/new/' filename
  10. cut – Remove sections from each line of files. cut -d':' -f1 /etc/passwd
  11. sort – Sort lines of text files. sort filename
  12. uniq – Report or omit repeated lines. uniq filename
  13. diff – Compare files line by line. diff file1 file2
  14. head – Output the first part of files. head -n 10 filename # outputs the first 10 lines of filename
  15. tail – Output the last part of files. tail -n 10 filename # outputs the last 10 lines of filename
  16. xargs – Build and execute command lines from standard input. find . -name "*.txt" | xargs rm
  17. touch – Change file timestamps. touch filename
  18. cat – Concatenate and print (or display) the content of files. cat filename
  19. less – Display file content page by page. less filename
  20. more – Display file content page by page (similar to less but less feature-rich).
    bash more filename

These commands cover aspects like process management, file searching, text processing, and viewing file contents among others. By learning these commands, users can perform a myriad of tasks on a Macintosh computer efficiently and effectively from the command line.


  1. who – Show who is logged on. who
  2. w – Show who is logged on and what they are doing. w
  3. uptime – Tell how long the system has been running. uptime
  4. date – Print or set the system date and time. date
  5. cal – Display a calendar. cal
  6. df – Report file system disk space usage. df -h
  7. du – Estimate file space usage. du -sh /path/to/directory
  8. free – Display the amount of free and used memory in the system. free -h
  9. top – Display Linux tasks (dynamic view of system processes). top
  10. htop – Interactive process viewer (advanced version of top). htop
  11. alias – Create an alias for a command. alias ll='ls -la'
  12. unalias – Remove an alias. unalias ll
  13. history – Display the command history. history
  14. clear – Clear the terminal screen. clear
  15. exit – Exit the shell. exit
  16. ssh – OpenSSH SSH client (remote login program). ssh username@hostname
  17. scp – Secure copy (remote file copy program). scp file.txt username@hostname:/path/to/directory
  18. rsync – A fast, versatile, remote (and local) file-copying tool. rsync -av /path/to/source-directory username@hostname:/path/to/destination-directory
  19. curl – Transfer data from or to a server. curl http://example.com
  20. wget – Non-interactive network downloader.
    bash wget http://example.com/file.zip

These commands help users to gather system information, manage disk space, create command aliases, and perform network-related tasks among others. By mastering these commands, users can control and interrogate their Macintosh system proficiently via the command line interface.