Monday, 9:00–10:30: Getting to know your OS: file and directory system (Windows)
[Introduction; verify that everyone’s Internet connections work]
File system hierarchy
- What are files?
- What are directories/folders?
- What are programs?
- GUI file explorers and file hierarchy
Configuring your machine to show filename extensions
- <screenshot> In any File Explorer window, click on “View” tab, and then “Options” on the right to open the “Folder Options” window.
- In the “View” tab, uncheck “Hide extensions for known file types” box.
Configuring your machine to show hidden files, and more
- <screenshot> In the same “Folder Options” window as before,
- Check “Show hidden files, folders, and drives”.
- NOTE: Protected operating system files will still stay hidden.
- Also check “Display the full path in the title bar” (not essential, but recommended).
- Check “Show hidden files, folders, and drives”.
About files
- Why are some files hidden?
- Case sensitive vs case preserving
- Linux is case sensitive, meaning files with the same name but different capitalization are different files (e.g.,
finalpaper.txt
is different thanFinalPaper.txt
). - Mac OS and Windows are case preserving, but not case sensitive.
- Linux is case sensitive, meaning files with the same name but different capitalization are different files (e.g.,
- Spaces in a file and directory names. Why could these be problematic?
Launching a terminal
- The Command Prompt cmd.exe <screenshot> is the native Windows console, which grew out of DOS. We will be using it in this session.
- How to launch: from the Start menu type in “cmd”.
- NOTE: For later sessions and the remainder of this institute we will be using the bash shell instead, which you downloaded and installed as part of Git. This is the command line interface we use and recommend.
Moving through a filesystem
- Navigate up and down, with emphasis on the paths in the title bar
- Drive letter in Windows:
C:\Users
(Windowscmd
)- Drive letter elsewhere:
/c/Users
(Windows Gitbash
),/Users
(no drive letter in Mac OS and Linux)
- Drive letter elsewhere:
cd
: change directorydir
: list all files
File/directory path in File Explorer GUI vs. cmd
- Matching the GUI file path with the file/directory path in the terminal
- User-specific directories: where are your home directory, document folder, and desktop? What are their full file/directory paths?
- Non-English OS’s may have translation/localization applied, but only on the GUI side!
- In Spanish Windows, a user’s Documents folder would appear in File Explorer as “Usarios > jeremy > Documentos”
- The same folder will appear on the command line as
C:\Users\jeremy\Documents
External drives and mounting
How removable and external drives (such as a USB thumbdrive) are treated in GUI vs. terminal environment
- In Windows, they are assigned a new drive letter:
d:\
e:\
(cmd) - In Git bash environment (will learn this later), they look like:
/d/
/e/
How to run a program as an administrator
- Right click on a program icon (say, Command Prompt) and select “Run as administrator”.
- CAUTION! You may accidentally break your system by removing essential files or directories.
- Use only when you have a good reason to; close program when done.
Environment variables (aka system variables)
- How to view environment variables through a GUI
- File Explorer -> Right click on ‘This PC’, select ‘Properties’ -> Advanced System Settings -> Environment Variables
- How to view environment variables in a terminal
- In
cmd
, type in:set
- In