💻 Self-Study Lesson: Mastering the Windows 7 Command Line
Objective: Learn to use 25 of the most commonly used Windows 7 command line (CLI) commands to navigate, manage files, troubleshoot, and control system behavior.
🧰 Getting Started
Step 1: Open the Command Prompt:
- Click Start → type
cmd
→ press Enter
You will see a black window with a blinking cursor. That is your command line interface (CLI).
📁 Section 1: File and Directory Management
- dir – List directory contents
dir C:\Users
- cd – Change directory
cd C:\Users\YourName\Documents
- mkdir – Create directory
mkdir CLI_Test
- rmdir – Remove directory
rmdir CLI_Test
- copy – Copy a file
copy file1.txt C:\Users\YourName\Desktop
- move – Move a file
move file1.txt C:\Users\YourName\Downloads
- del – Delete a file
del file1.txt
- attrib – Set file attributes
attrib +h file2.txt
and attrib -h file2.txt
Practice Task:
Navigate to your Documents folder, create a folder called PracticeCLI
, create a file, move it, hide it, and delete it using only the CLI.
🌐 Section 2: Networking and System Info
- ipconfig – View IP configuration
ipconfig /all
- ping – Test connection
ping google.com
- tracert – Trace route
tracert google.com
- netstat – View active network connections
netstat
- systeminfo – System details
systeminfo
- chkdsk – Check disk errors
chkdsk C:
- sfc – Scan and fix system files
sfc /scannow
- shutdown – Shut down/restart
shutdown /r /t 30
- cls – Clear the screen
cls
Practice Task:
Trace the route to microsoft.com
, view your system specs, and clear the screen using cls
.
🧠 Section 3: Process and User Management
- tasklist – List running processes
tasklist
- taskkill – Kill a process
taskkill /IM notepad.exe
- net user – View user accounts
net user
- net localgroup – View groups
net localgroup administrators
- runas – Run program as another user
runas /user:Administrator cmd
Practice Task:
Open Notepad, find it using tasklist
, and close it using taskkill
.
🔄 Section 4: Advanced Copying Tools
- xcopy – Copy entire directories
xcopy C:\Folder1 C:\BackupFolder /E /I
- robocopy – Robust file copy
robocopy C:\Folder1 C:\BackupFolder /MIR
Practice Task:
Create a folder with several files and use xcopy
or robocopy
to copy the entire folder to a backup location.
📘 Section 5: Getting Help
- help – List or describe commands
help
or command /?
Final Task:
Use help
or /?
to learn more about tasklist
, attrib
, and shutdown
. Write down 2 things you learned for each.
📝 Reflection Questions
- Which CLI command did you find most useful?
- Why do IT professionals still use the command line?
- How would you copy a hidden file to a different folder using CLI?