1102 - Chapter 15 Working With The Command-Line Interface - Slide Handouts
1102 - Chapter 15 Working With The Command-Line Interface - Slide Handouts
Line Interface
Chapter 15
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Understanding the CLI
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 0:39 - Command-line interface (CLI)
• 1:04 - Command Prompt
• 1:34 - Windows PowerShell
• 2:14 - Bash shell
• 3:49 - Objective term - dir
• 4:45 - dir /p
• 4:48 - Switch
• 5:37 - Objective term - dir /?
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 6:27 - cls
• 7:16 - Objective term - sudo
• 7:23 - Objective term - sudo ls
• 7:59 - Objective term - su allows for a one-time
admin login
• 7:59 - Objective term - sudo is used per
command
• 8:37 - clear
• 8:54 - ls -l
• 9:55 - Objective term - man
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• All operating systems offer a command-
line interface (CLI)
• A specific CLI is called a shell; most OSes
provide multiple shell choices
• All shells have a prompt to type in
commands
• Many commands use switches
• All shells offer some form of help
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Navigating the CLI
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 0:29 - Objective term - dir
• 1:00 - Objective term - cd\
• 1:14 - Root directory
• 1:40 - Objective term - “cd” stands for
change directory
• 2:14 - One "." shows where you are
• 2:19 - Double ".." shows the folder above
where you are
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 2:31 - cd ..
• 2:55 - cd\windows
• 3:23 - cd Temp
• 3:56 - Objective term - cd c:\Windows
• 6:20 - Objective term - d:
• 7:19 - Objective term - x:
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• Use the cd command in all operating systems
to move the prompt to different
folders/directories
• To change drives in Windows, type the drive
letter at a prompt and press the Enter key
• When it comes to capitalization, Linux is case-
sensitive
• For navigation paths: Windows uses \ and
Linux uses /
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Working with Folders
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 1:16 - Objective term - md mike
• 3:55 - rd mike
• 4:32 - You can’t delete directories using “rd” in
Windows. To delete directories, use the “rd /s”
command.
• 5:12 - mkdir mike
• 5:23 - Up arrow key shows previous commands
• 5:47 - Objective term - rmdir Mike/
• 6:02 - Objective term - rmdir mike/
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• Use the md (Windows) or mkdir (Linux)
command to make a folder or directory
• Windows is case insensitive; Linux is case
sensitive
• Use the rd (Windows) or rmdir (Linux)
command to delete or remove a folder or
directory
• Use rd /s (Windows) or rm -r (Linux) to
remove a directory and its contents
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Working with Files
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 0:55 - del mike1.jpg
• 1:33 - Wildcard
• 1:51 - del *.txt
• 2:28 - del *.*
• 3:24 - Objective term - copy fred.txt k:
• 8:26 - Objective term - rm Mike1.odt
• 9:22 - Objective term - cp in Linux will copy
• 9:22 - Objective term - mv in Linux will move
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• Use the del (Windows) or rm (Linux)
command to delete files
• Use wildcards to work with more than one
file at a time
• Use the copy (Windows) or cp
(Linux) command to copy files
• Use the move (Windows) or mv (Linux)
command to copy a file to a new location
while deleting the previous file
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Working with Drives
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 0:18 - Objective term - Format
• 1:10 - /FS:filesystem to specify the type of file
system
• 1:19 - Objective term - format e: /FS:NTFS
• 1:44 - /Q for quick format
• 1:57 - Objective L3 - format e: /FS:NTFS /Q
• 2:52 - Objective term - chkdsk
• 4:04 - Objective term - chkdsk /f
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 5:01 - Objective term - System File
Checker (SFC) Deployment Image
Servicing & Management (DISM)
• 5:52 - Objective term - sfc /scannow
• 6:28 - sfc /verifyonly (scans without
repairing)
• 7:43 - dism /online /cleanup-image
/restorehealth
• 9:34 - Objective term - diskpart
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• The format command formats partitions
and uses many switches to control the
type of format
• chkdsk fixes formatted partitions
• sfc repairs critical Windows files based on
the system store
• dism repairs critical Windows files based
on online system stores
• diskpart partitions drives
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Super Copy Commands
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• The copy command is inconvenient for
copying directory trees
• xcopy is the original Windows tool to copy
entire directory trees, including any files in
the tree
• robocopy is an improved version of xcopy,
it's faster and safer
• Linux uses the dd command
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Command-Line Permissions
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 0:28 - icacls
• 1:14 - Objective term - chmod
• 2:05 - rwxrwxrwx
• 5:21 - Objective term - chown
• 6:17 - passwd
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• icacls changes Windows NTFS
permissions from the command line
• chmod changes Linux permissions
• chown enables root users to take
control of any Linux folder or file
• passwd changes the password in Linux
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Advanced Windows Commands
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• The shutdown command shuts down
the system
• tasklist lists the processes on a system
• taskkill shuts down processes on a
system
• gpupdate or gpresult forces policy
updates to a system and lists
the resultant policy
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Advanced Linux Commands
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• shutdown shuts down the system
• apt-get gives users access to the
Debian repository
• The ps command gives control over
processes
• kill shuts down processes
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Introduction to Scripting
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 1:17 - Batch file
• 1:24 - Notepad
• 2:22 - Objective term - Batch files use extension
“.bat”
• 3:28 - Environment variable
• 5:29 - PowerShell
• 5:56 - Objective term - PowerShell use extension
“.ps1”
• 6:26 - cmdlet
• 7:24 - Integrated Scripting Environment (ISE)
• 8:16 - Bash shell uses extension “.sh”
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• A batch file is a text file that stores a list of
commands
• Batch files use a “.bat” file extension
• Environment variables are phrases that
point to system-wide functions
• PowerShell provides far more powerful
scripts
• Linux bash shell scripts also provide
powerful scripting functions
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Interpreted Languages
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
0:42 - Executable files have a ".exe" extension
1:07 - Compiled code
4:09 - Objective term - Visual basic uses the
".vbs" extension
4:41 - Variables
5:13 - Integers and strings
8:01 - Objective term - Python (uses ".py"
extension)
9:18 - Web application
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 9:15 - Objective term - JavaScript (uses ".js"
extension)
• 9:22 - Client-side application
• 10:30 - For statement
• 10:43 - If statement
• 10:50 - Functions
• 11:31 - Objective term - Visual Basic - “.vbs”
• 11:31 - Objective term - Python - “.py”
• 11:31 - Objective term - JavaScript - “.js”
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• Operating systems have built-in
interpreters
• Visual Basic is only for Windows and
uses files with the “.vbs” extension
• Python is easier to read for most people
and uses a “.py” extension
• JavaScript is used for client-side Web
applications and uses the “.js” extension
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode: Scripting and the Terminal
Core 2: 1.2 Given a scenario, use the appropriate Microsoft command-line tool.
Core 2: 1.11 Identify common features and tools of the Linux client/desktop OS.
Objective(s): Core 2: 3.1 Given a scenario, troubleshoot common Windows OS problems.
Core 2: 4.8 Identify the basics of scripting.
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Episode Description
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 0:32 - Objective term - Terminal
• 0:46 - Objective term - hostname
• 0:54 - Objective term - pathping
• 1:19 - Objective term - Time drift
• 2:20 - Objective term - nano is a text editor
• 3:15 - Objective term - cp
• 3:32 - Objective term - Add the ".sh"
extension to turn a file into a batch script
• 5:40 - Objective term - Basic automation
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 5:48 - Objective term - Automate backups
• 5:53 - Objective term - Installation of
applications
• 6:01 - Objective term - Restart machine
• 6:12 - Objective term - shutdown /r /t
• 6:58 - Objective term - /? brings up a help
menu in Windows command line
• 7:19 - Objective term - man brings up a help
menu in Linux terminal
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Key Terms
• 7:46 - Objective term - mv
• Objective term - Gathering of
information/data
• Objective term - Initiating updates
• 8:13 - Objective term - Verify script source to
avoid unintentionally introducing malware
• 8:33 - Objective term - Be careful not to
inadvertently change system settings
• 8:58 - Objective term - Browser or system
crashes due to mishandling of resources
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Windows Command-Line
Reference Sheet
• https://docs.microsoft.com/en-
us/windows-
server/administration/windows-
commands/windows-commands
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson
Quick Review
• You can set up scrips to automate useful
functions such as remapping network
drives and scheduling backups
• Always be cautious that your scripts don’t
inadvertently change system settings or
cause a mishandling of resources
• Triple check the URLs used in scripting to
avoid unintentionally introducing malware
into the system
CompTIA A+ (220-110x)
Mike Meyers and Steve Nicholson