File System Navigation & Basics

How to move around, view files, and understand paths in both Windows and Linux.

Files & Storage

File System Navigation & Basics

How to move around, view files, and understand paths in both Windows and Linux.

Directory Structures

Both operating systems use a tree structure, but the roots and path separators differ.

Windows

Windows uses drive letters (like C:) as the root of the tree, and backslashes (\) to separate directories.

  • Root: C:\
  • User Home: C:\Users\Username
  • System Files: C:\Windows

Linux

Linux uses a single unified root directory (/), and forward slashes (/) to separate directories. Drives are mounted within this tree.

  • Root: /
  • User Home: /home/username (or /root for admin)
  • System Files: /etc, /bin, /var

Basic Navigation Commands

List Files (PowerShell)

Get-ChildItem

or ‘dir’ or ‘ls’ (aliases)

Change Directory

Set-Location C:\Users

or ‘cd C:\Users’

Print Working Directory

Get-Location

or ‘pwd’

List Files (Bash)

ls -la

Change Directory

cd /home/user

Print Working Directory

pwd