Terminal Commands

Here’s what each of these terminal commands does:

  1. ls: Lists the files and directories in the current directory. You can add options like -l for a detailed list (permissions, owner, size, etc.) or -a to show hidden files.

  2. pwd: Stands for "print working directory." This command displays the path of the current directory you are in.

  3. cd Desktop: Changes the directory to "Desktop." If "Desktop" exists in your current location, you'll move into that folder. You can use cd with other directory names to navigate your file system.

  4. uname: Displays system information. Running uname by itself shows the OS name. Adding -a (like uname -a) gives you detailed information, including the kernel version, machine hardware, etc.

  5. whoami: Prints the username of the current user. It shows which user is currently logged into the terminal session.

  6. id: Displays user and group information for the current user. It includes the user ID (UID), group ID (GID), and groups the user is associated with.

  7. hostname: Shows the name of the host (the computer’s network name). This is typically the name assigned to the computer when it was set up.

  8. cd -- : used to go back a directory one level