Chammarychammary

Command Line Basics for Beginners - Full Course

freeCodeCamp.org · 45:19 · 2 weeks ago

This course teaches foundational command line skills—such as navigation, file management, and input/output control—by guiding users through the creation of a project file structure.

  • Terminal purpose — It serves as a text-based interface for the operating system, allowing for faster navigation and automation compared to standard visual file managers .

  • Tracking location — Use the pwd command to print the current working directory path .

  • Listing contents — Run ls to display all files and folders located within the active directory .

  • Changing folders — Navigate to a new location using the cd (change directory) command .

  • Parent navigation — Type .. to move one level up the file hierarchy .

  • File management — Create new files with the touch command and remove them using rm .

  • Directory control — Use mkdir to build new folders, and rmdir (or rm -r for folders with content) to delete them .

  • Writing text — Use echo to output text to the screen, or use the > operator to redirect that output into a file .

  • Appending content — Utilize the >> operator to add new text to the end of a file without overwriting existing data .

  • Reading data — Run the cat command to display the contents of a file inside the terminal window .

  • How does the cat command function when used with a redirection operator?

  • What is the difference between rmdir and rm -r when deleting folders?