Back to Blog

Terminal Basics for Beginners | ls, ls -la, pwd Commands Explained

Sandy LaneSandy Lane

Video: Terminal Basics for Beginners | ls, ls -la, pwd Commands Explained by Taught by Celeste AI - AI Coding Coach

Watch full page →

Terminal Basics for Beginners: ls, ls -la, and pwd Commands Explained

Mastering basic terminal commands is essential for any developer working with the command line. This guide covers three fundamental commands: ls to list files, ls -la to view detailed file information including hidden files, and pwd to display your current directory path.

Code

# List all files and directories in the current directory
ls

# List all files including hidden ones, with detailed information
ls -la

# Print the full path of the current working directory
pwd

Key Points

  • ls shows files and folders in your current directory.
  • ls -la reveals hidden files (those starting with a dot) and provides details like permissions, ownership, size, and modification date.
  • pwd displays the absolute path of your current location in the filesystem.
  • These commands help you navigate and understand your file system efficiently from the terminal.
  • Regular practice with these commands builds confidence in using the command line interface.