Chapter 15: Command Line Interface Flashcards

1
Q

CLI

A

Command Line Interface

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

Shell

A

Command line interpreter program

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

\

A

backslash (Windows)

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

/

A

forward slash (UNIX)

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

sudo; su

A

Super user privileges in UNIX, write before your commands

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

Working Directory

A

Current directory (where terminal is focused)

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

Absolute Path

A

full file location

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

Relative Path

A

path based off a starting point

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

pwd

A

UNIX - full path

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

~

A

UNIX - home directory

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

switch

A

“options” for different commands, typically following the command

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

[command] /?

A

WINDOWS - get help on what command does (manual)

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

man [command]

A

UNIX - get help on what command does (manual)

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

builtin vs external

A

builtin - command that is part of the shell
external - command that is not innate to shell

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

type [command]

A

UNIX - gives the type of command written

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

type - a [command]

A

UNIX - gives all types of that command, not just default type

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

Get-[command]

A

WINDOWS - gives info on command

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

dir
dir /p

A

WINDOWS - shows directory contents
shows directory contents but pauses after one page

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

ls
ls | more
ls -l

A

UNIX - shows directory contents
shows contents but pasuses after one page
shows long form details on contents

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

cd \path
cd ..

A

changes directory focus
moves focus up a directory (to parent)

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

e: (command prompt)

A

WINDOWS - switches to e: drive

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

Switching drives in UNIX

A

must look manually
MacOS - check the /Volumes
Ubuntu - check /mnt or /media/<user></user>

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

md [name]

A

WINDOWS - create a directory given name

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

mkdir [name]

A

UNIX and WINDOWS - create a directory given name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
rd [name]
WINDOWS - remove directory
26
rmdir [name]
UNIX AND WINDOWS - remove directory
27
rd [name] /s
WINDOWS - remove directory and all contents
28
rm -r [name]
UNIX - remove direcotry and alll contents
29
more [name]
WINDOWS - when in directory, writes out contents of txt file
30
cat [name]
WINDOWS AND UNIX - when in directory, writes out contents of txt file
31
wildcards
use * to indicate catchall spaces e.g. *.pdf (all pdf files) or a* (all files that start with "a")
32
del [name]
WINDOWS - deletes a file
33
rm [name]
UNIX - deletes a file
34
copy [name]
WINDOWS - copies a file
35
syntax for copying/moving in WINDOWS or UNIX
[command] [name] [destination path]
36
move [name]
WINDOWS - moves a file
37
cp [name]
UNIX - copy a file
38
mv [name]
UNIX - move a file
39
xcopy
WINDOWS - copy bulk directories
40
xcopy switches
/s - copy all subdirectories that aren't empty /e - include all empty directories
41
robocopy
WINDOWS - Robust Copy, can copy across networks, has many functions
42
Robocopy syntax and mirror switch
robocopy [source path] [destination path] [options] /mir - mirror source structure
43
format
WINDOWS - format a volume, has extensive switch options
44
hostname
WINDOWS - show name of computer
45
winver
WINDOWS - get version info
46
gpupdate
WINDOWS - update group policy (force)
47
gpresult
WINDOWS - detailed group policy
48
gpresult syntax
gpresult /user [username] /r
49
sfc
WINDOWS - system file check, fix corrupted files
50
shutdown
WINDOWS - turn off machine /r to restart
51
ps aux
UNIX - onetime snapshot of current processes (detailed)
52
top
UNIX - focuses on resource hungry process
53
chkdsk /f /r
WINDOWS - scan, detect, and repair disk issues /f - fix file errors /r - locate and repair bad sectors
54
ps vs top
UNIX ps gives you snapshot of processes and details on this info top gives you dynamic, updating, interactive info on processes
55
grep
UNIX - search for and print text strings in a file (may need to specify path)
56
find syntax
UNIX: find [path] -iname "criteria" looks for files that match criteria
57
APT
UNIX - Advanced packaging tool, used to manipulate apps via command line in Debian family
58
apt-get update
UNIX - Updates Ubuntu systems
59
yum
UNIX - packaging tool used to manipulate apps via command lin in Redhat family
60
nano
UNIX - creates a text file nano "file" for name
61
dd
UNIX - create an image of a drive
62
df -h
UNIX - what diskspace is free? -h switch creates human friendly output
63
Scripting Languages
Batch File/.bat - old command, DOS PowerShell/.ps1 - modern windows bash/.sh - UNIX Python/.py Javascript/.js VisualBasicScript/.vbs
64
Use Cases for Scripting
Basic Automation Restarting Machines Remapping Network Drives Installing Apps AutoBackup Data Gathering Updates