Chapter 1: Initial Set Up Flashcards

1
Q

define command line

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

command line caution…

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

other terms for command line (5)

A

CLI (Command Line Interface), console, terminal, shell, prompt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

define terminal

A

the program that opens up a new window to access the command line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

define console

A

a text-based application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

define shell

A

the program that runs commands on the underlying operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

define prompt

A

where commands are typed and run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what comes to the left of the % in terminal?

A

Don’t worry about what comes to the LEFT of the % prompt. It varies by computer and can be customized

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the default shell for macOS?

A

zsh (Z shell)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does the $ prompt indicate?

A

you are using the previous default macOS shell, Bash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

define unix

A
  • a multiuser, multitasking operating system (OS)
  • essential components, including the kernel, shell, file system and a core set of utilities or programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

define kernel

A

a master control program that starts and ends programs. also handles low-level operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how to comment in shell commands?

A

#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

pwd command

A

print working directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

change directory

A

cd command + intended location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how to make a new directory?

A

mkdir + new directory name

17
Q

how to autocomplete a command/cycle through options?

A

tab key

18
Q

how to clear terminal of past commands and outputs

A

clear

19
Q

how to cycle through previous commands

A

↑ and ↓ keys

20
Q

where can you find a complete list of shell commands?

A

ss64.com

21
Q

what does&raquo_space;> indicate?

A

that you are inside python itself, NOT the command line. shell commands will raise errors. only python code will work

22
Q

advantages and limitations of python interactive mode (1, 2)

A

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

23
Q

how to exit python and return to command line

A

exit()
OR
ctrl+d

24
Q

what is the advantage of virtual environments?

A

allow you to create and manage separate environments for each Python project on the same computer

25
Q

how to print a message on terminal

A

echo “text in quotes”