The Complete Beginner’s Guide to Terminal/Command Prompt

The station (on Mac/Linux) or command instrument (on Windows) is a powerful tool that allows you to interact with your computer using text orders instead of clicking through a graphic interface. Although it may seem frightening at first, mastering the basic peripheral orders can help you:
- Transfer through files and folders more efficiently
- Performing incomplete tasks through the regular interface
- Automation of repeated tasks
- Get a deeper understanding of how your computer works
This guide will provide you with the basic orders and concepts to start, regardless of the operating system you use.
Start
Open the station
On Windows:
- Click Win + R, Type CMD and Press Enter
- Or I am looking for a “command wave” in the beginning list
On Mac:
- Click Command + Space to open the lights, write “Terminal”, and press Enter
- Or search for a station in applications → Facilities → Station
Linux:
- Click CTRL + Alt + T (on most distributions)
- Or search for “Terminal” in your application list
Understand the claim
When the station opens for the first time, you will see a claim that looks like this:
- Windows: C: \ User \ Yourusername>
- Mac/Linux: Username@computer: ~ $
This tells you:
- Your current site in the file system
- Where do you write your orders?
- On Mac/Linux, the symbol ~ your home guide is represented
Basic mobility orders
View your current site
Windows: Disk
Mac/Linux: PWD (printing guide)
example:
Insert files and evidence
Windows: monastery
Mac/Linux: LS
example:

Options:
- LS -l -List with detailed information (file size, date modification, permissions)
- LS -A -Show hidden files (files that start with a point)
- LS -La -Combining both options
Changing evidence
All platforms: CD Directoryname
Examples:

Establish evidence
All platforms: Mkdir directoryname
example:

Create files
Windows: Write NUL> Filename.txt
Mac/Linux: Filename.txt
example:

Work with files
View file contents
Windows: Write the name Filename.txt
Mac/Linux: Cat filename.txt
For the largest files:
Windows: More filename.txt
Mac/Linux: Less file
Copy files
Windows: Copy a source destination
Mac/Linux: CP source destination
example:

Transfer/rename files
Windows: Transfer the source of the source
Mac/Linux: MV source destination
Examples:

Delete files and evidence
Windows:

Mac/Linux:

⚠ Warning: Be very careful with deletion orders, especially RM -r! There is no “recycling basket” or “garbage” when using the station – permanent deletion.
Useful tips
Date of leadership
- Click the arrow up to rotate through the previously used orders
- On Mac/Linux, write the record to see a list of modern orders
Complete the tab
- Start writing a file or guide name, then press the tab
- The station will try to complete it
- If there are multiple options, click TAB twice to see all possibilities
Get help
Windows: Help or command /?
Mac/Linux: Lead the man (manual pages, press Q out)
Examples:

Screen cleansing
Windows: CLS
Mac/Linux: Obvious or ctrl+L
Energy user orders
Find files
Windows: file name
Mac/Linux: He finds. file name
Inside the files
Windows: Search for the “text” file name
Mac/Linux: Grep file name
Sequence orders
All platforms: Use && to run orders in the sequence
example:

Restore directing
All platforms: Use> to send the output to a file
example:

The following steps
When you become more comfortable with these basic orders, you may want to explore:
- Order of command line, such as Nano, VIM, or EMACS
- Writing simple shell texts to automate tasks
- Packages like APT (Linux), HomeBrew (Mac) or Chocolayy (Windows)
- Environmental variables and how to adjust them
- SSH to connect computers remote
Common errors, exploring and repairing errors
- The matter is not found: Check the spelling or make sure it is available on your system
- permission denied: You may need the officials’ privileges/root
- Windows: Run the orders as an official
- Mac/Linux: Use subo before orders that need high privileges
- No such file or directory: Check the path and names of files
- The process is not allowed: Like the rejected permission, you may need special permissions
Tasks | Windows | Mac/Linux |
The current site | Disk | Those with a large number of people |
File menu | monastery | LS |
Change the guide | Disk | Disk |
Create a guide | MKDIR Deir | MKDIR Deir |
Create a file | Write NUL> File | Touch file |
Copy file | Copy a source destination | CP source destination |
Transfer/rename | Transfer the source of the source | MV source destination |
Delete the file | Del file | RM file |
Delete the guide | RMDIR /S DIR | RM -r monastery |
A clear screen | CLS | clear |
Get help | help | Leading the man |
conclusion
In this tutorial, we have covered everything that beginners need to know about using the station. We discovered how to open the station through various operating systems, mobility in file systems, create and manage files and evidence, and use basic orders. We have also learned useful shortcuts, power user orders, and tips for exploring errors. With these foundational skills, you can now use the command line with confidence as a strong tool for your computing trip.
Remember that the station is a powerful tool that is equivalent to practice and experimentation. Don’t be afraid to try new orders, but always be careful with orders that adjust or delete files.
Also, do not hesitate to follow us twitter And do not forget to join 85k+ ml subreddit.
🔥 [Register Now] The virtual Minicon Conference on Open Source AI: Free Registration + attendance Certificate + 3 hours short (April 12, 9 am- 12 pm Pacific time) [Sponsored]

Niegel, a trainee consultant at Marktechpost. It follows an integrated double degree in materials at the Indian Institute of Technology, Khargpur. Nichil is a fan of artificial intelligence/ml that always looks for applications in areas such as biomedics and biomedical sciences. With a strong background in material science, it explores new progress and creates opportunities to contribute.
2025-04-01 19:35:00