Home › Guides

Command Prompt and Terminal Basics for Beginners

Command Prompt and Terminal Basics for Beginners

The command line lets you control the computer by typing instructions. It can look intimidating, but a few commands cover most everyday tasks. Knowing the basics helps with troubleshooting and lets you do some jobs faster. Only type commands you understand, because some commands can delete files without asking.

Open the tool

Find where you are

On Windows, type cd with no other text to show the current folder. On Mac, type pwd, which means print working directory. The current folder is shown in the prompt on most systems.

List files

Move between folders

Type cd followed by a folder name to move into it, and cd .. to move up one level. On Mac, the same command works. Use the Tab key to complete names automatically, which avoids typing mistakes.

Useful safe commands to learn first

TaskWindowsMac
Show the IP addressipconfigifconfig
Test a connectionping example.comping example.com
Show system informationsysteminfosystem_profiler SPHardwareDataType
Check battery report (Windows)powercfg /batteryreportNot applicable

The ping command is useful for checking whether your internet connection works. The ipconfig command shows your current network settings.

Commands to be careful with

Frequently asked questions

Do I need to learn the command line?

Most people do not, but a few commands help when troubleshooting networks or checking system information.

How do I copy text into the terminal?

On Windows Terminal, Ctrl + Shift + V pastes. On Mac Terminal, Command + V pastes. Check the app's edit menu for copy options.

For more on the tools that help you troubleshoot, see how to use Task Manager.

Use help for each command

Most Windows commands support a help switch, such as typing the command followed by /?. On Mac and Linux, many commands support --help or the man command, which opens the manual page. Reading the help text before running a command is one of the best habits to build early.

Start with read-only commands

Commands that only display information are a safe place to begin. Practise listing folders, checking network settings and showing system details before you try anything that changes files or settings. Once you are confident, you can move on to tasks such as creating folders and copying files.

Related reading