Using the Command Prompt - potatoscript/windows-os GitHub Wiki
What is the Command Prompt? 🤔
The Command Prompt is a place where you can type special commands that tell your computer what to do. It’s like talking to your computer in its own language! You can open programs, manage files, and fix problems with just a few commands.
Step 1: Opening the Command Prompt 🖥️
How to Do It:
- Click on the Start Menu (the Windows icon) at the bottom-left of your screen.
- Type in cmd (it stands for Command Prompt).
- When you see Command Prompt in the list, click on it.
- It will open a black window with a cursor blinking like this:
C:\>
.
- It will open a black window with a cursor blinking like this:
Icon:
🖱️ The Start Menu with the search bar, and the Command Prompt option.
dir
(List Files) 📂
Step 2: Basic Command: What does it do?
The dir
command lists all the files and folders in the folder you're in. It’s like opening a folder to see what’s inside!
How to Do It:
- Type
dir
in the Command Prompt. - Press Enter.
- You will see a list of files and folders in the current directory.
Icon:
📑 A folder with papers to represent files.
cd
(Go to a Folder) 📁
Step 3: Change Directory: What does it do?
The cd
command lets you change where you are in the file system. It’s like opening a folder to look inside it!
How to Do It:
- To change to a folder, type
cd FolderName
(replace "FolderName" with the name of your folder).- For example:
cd Documents
.
- For example:
- Press Enter.
- Now, you’re inside the Documents folder! You can use
dir
to see what's in there.
Icon:
📂 A folder icon to show you're changing folders.
mkdir
(Make a Folder) 📁
Step 4: Create a New Folder: What does it do?
The mkdir
command helps you create new folders (directories) to store your files!
How to Do It:
- To create a new folder, type
mkdir FolderName
(replace "FolderName" with the name you want for your folder).- Example:
mkdir MyNewFolder
.
- Example:
- Press Enter.
- Now you have a folder called MyNewFolder!
Icon:
🗂️ A folder icon to show you're creating a new folder.
del
and rmdir
(Remove a Folder) 🗑️
Step 5: Delete a File or Folder: What does it do?
The del
command deletes files, and the rmdir
command deletes empty folders. Be careful, once you delete something here, you can’t get it back easily!
How to Do It:
-
To delete a file:
- Type
del FileName
(replace "FileName" with the name of the file you want to delete).- Example:
del MyFile.txt
.
- Example:
- Press Enter.
- Type
-
To delete a folder:
- Type
rmdir FolderName
(replace "FolderName" with the name of the folder).- Example:
rmdir MyNewFolder
.
- Example:
- Press Enter.
- Type
Icon:
🗑️ A trash bin to represent deleting files.
cls
(Clean Up) ✨
Step 6: Clear the Screen: What does it do?
The cls
command cleans up the screen by removing everything you typed before. It’s like wiping off a whiteboard to start fresh!
How to Do It:
- Type
cls
in the Command Prompt. - Press Enter.
- Your screen is now clean and ready for new commands!
Icon:
🧼 A clean-up icon to clear the screen.
ipconfig
🌐
Step 7: Check Your Computer’s IP Address: What does it do?
The ipconfig
command tells you your computer's IP address, which is like the address for your computer on the internet!
How to Do It:
- Type
ipconfig
in the Command Prompt. - Press Enter.
- You’ll see your IPv4 address, which is your computer’s unique address on the internet.
Icon:
🌍 A globe to represent the internet and your IP address.
Step 8: Run a Program: Just Type Its Name! 🖥️
What does it do?
You can open programs directly from the Command Prompt by typing their name!
How to Do It:
- Type the name of the program you want to open.
- For example, type
notepad
to open Notepad.
- For example, type
- Press Enter.
- Notepad will open on your screen!
Icon:
📝 A notepad icon to represent opening Notepad.
help
(Ask for Help) 💬
Step 9: Get Help: What does it do?
The help
command tells you about all the commands you can use in the Command Prompt. It’s like asking for directions!
How to Do It:
- Type
help
in the Command Prompt. - Press Enter.
- You’ll see a list of commands that you can use and what they do.
Icon:
❓ A question mark to represent asking for help.
Step 10: Exit Command Prompt ❌
What does it do?
When you’re done, you can exit the Command Prompt to close it.
How to Do It:
- Type
exit
. - Press Enter.
- The Command Prompt will close.
Icon:
🚪 A door icon to represent closing the Command Prompt.