Chapter 1: Initial Set Up Flashcards
define command line
- text-only interface where we run and execute text-only commands
- alternative to the mouse or finger-based graphical user interface
- necessary to…
-execute programs,- install software
- use Git for version control
- and connect to servers in the cloud
command line caution…
There is often no feedback after a command has run, and it is possible to wipe the contents of an entire computer with a single command if you’re not careful: no warning will pop up! As a result, use the command line with caution. Do not blindly copy and paste commands you find online
other terms for command line (5)
CLI (Command Line Interface), console, terminal, shell, prompt
define terminal
the program that opens up a new window to access the command line
define console
a text-based application
define shell
the program that runs commands on the underlying operating system
define prompt
where commands are typed and run
what comes to the left of the % in terminal?
Don’t worry about what comes to the LEFT of the % prompt. It varies by computer and can be customized
what is the default shell for macOS?
zsh (Z shell)
what does the $ prompt indicate?
you are using the previous default macOS shell, Bash
define unix
- a multiuser, multitasking operating system (OS)
- essential components, including the kernel, shell, file system and a core set of utilities or programs
define kernel
a master control program that starts and ends programs. also handles low-level operations
how to comment in shell commands?
#
pwd command
print working directory
change directory
cd command + intended location
how to make a new directory?
mkdir + new directory name
how to autocomplete a command/cycle through options?
tab key
how to clear terminal of past commands and outputs
clear
how to cycle through previous commands
↑ and ↓ keys
where can you find a complete list of shell commands?
ss64.com
what does»_space;> indicate?
that you are inside python itself, NOT the command line. shell commands will raise errors. only python code will work
advantages and limitations of python interactive mode (1, 2)
1) good to save time if you want to try out a short bit of code
2) can’t save work in a file
3) writing longer code snippets is cumbersome
how to exit python and return to command line
exit()
OR
ctrl+d
what is the advantage of virtual environments?
allow you to create and manage separate environments for each Python project on the same computer
how to print a message on terminal
echo “text in quotes”