which: Locating Executable Files which searches for executable files within the directories specified in the PATH environment variable. It returns the full path of the first matching executable. which ls # Outputs the path to the ls executable which -a ls # Lists all ls executables found in PATH whe...
Directory Operations Displaying and Navigating Directories pwd: Show the current working directory. clear: Clear the terminal screen. cd ~: Navigate to the current user's home directory. cd /: Navigate to the root directory. cd -: Return to the previous directory visited. cd ..: Move up one director...
Listing Files with ls Display all files and directories in the current working directory. ls List contents of a specific directory, using ./ for current or ../ for parenet. ls path Show detailed information in a long listing format. ls -l path ls -la path In the output, the first character indicates...