Mac Commands (Terminal)

Note: Open your Terminal and type the below commands to see each of them in action.

ls

Lists the contents of a directory.

cd

Changes the current directory.

mkdir

Creates a new directory.

rm 

Removes files or directories.

cp

Copies files or directories.

mv

Moves files or directories.

touch

Creates an empty file.

nano

Opens the Nano text editor.

cat

Displays the contents of a file.

clear

Clears the terminal window.

grep

Searches for patterns in files.

find

Searches for files and directories.

chmod

Changes file permissions.

chown

Changes file owner and group.

df

Displays disk space usage.

du

Displays disk usage for files and directories.

top

Displays system processes and their resource usage.

open

Opens a file or directory with its default application.

sudo

Executes a command with superuser privileges.

diskutil

Manages disk drives and volumes.

curl

Transfers data from or to a server.

scp

Securely copies files between hosts.

ssh

Connects to a remote host using SSH protocol.

kill

Terminates processes by process ID or name.