Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Terminal, Command Line, cmd, Shell,...

Terminal: What is it?


Synonyms: Command line (cmd), command prompt, shell
Early computers input/output system
Still widely used in IT, especially for remote access to servers

Terminal: Why should I care?


Run a python program
Run the interactive python terminal
You will have a course later this semster :-P
For automation tasks often the fastest tool
Some tasks can only be done using the terminal
Helps to understand how a computer works

Start the Terminal


Windows: Anaconda Prompt
1. Press Start-Button or <Windows> key
2. Search for Anaconda Prompt and select it
MacOS
1. Start Spotlight Search <command>+<space>
2. Type terminal and select the terminal

Windows

MacOS
Important Commands
Once the terminal is open, type commands and wait for the result.
The terminal opens in a directory of your file system, usually the home directory

Most common tasks


ls (MacOS, Linux) or dir (Windows): Lists all files in the current directory
cd: Change directory, changes the current directory.
Specify the directory name you want to change to e.g. cd Desktop
cd .. goes to parent directory

Usually you use ls/dir to list all directories and then cd to change into one of the listed directory.

Hints
Terminal is case-sensitive on Linux/MacOS but not on Windows
Use <Tab> for auto completion
The current directory is shown on each line before the >, $ or % sign
On Linux/MacOS ~ is short for the home directory
cd ~ will take you to your home directory

Help! Where am I?
Getting used to the terminal might take a while, especially working with and navigating the file system (the directories)
Initially you can use the file explorer (Finder on MacOS, File Explorer on Window) in parallel with the terminal

MacOS
1. Open the Finder
2. Press <command>+<shift>+G
3. An overlay opens: You can enter or copy-paste the path from the terminal here

Windows

1. Open the File Explorer


2. Click into the at the top of the window
3. You can enter the path you find in the Anaconda prompt here manually, or copy-paste it
Tutorials
MacOS academind.com/tutorials/terminal-zsh-basics
Windows www.computerhope.com/issues/chusedos.htm
Use the Anaconda Prompt instead of the cmd. The Anaconda Prompt has access to the python installation that comes with Anaconda,
cmd does not.
Linux: If you are using Linux, you are probably familiar with the terminal.

You might also like