Operating Systems and You: Becoming a Power User Flashcards

1
Q

What is the CLI?

A

Command Line Interpreter

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

What is Tab Completion?

A

Allows us to use the tab key to auto-complete file names or directories in the powershell/bash by beginning input at double tapping tab

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

What is the main directory in a Linux file system called?

A

the Root Directory

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

What are the 2 CLIs available in Windows?

A

Command Prompt: cmd.exe
PowerShell: powershell.exe

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

The main directory in a Windows system is ______

A

The drive the file system is stored on (eg: c:\ )

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

In powershell, what command lists the directories of the c drive?

A

c:\

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

If you needed a description of a command in powershell, what would you type before the command?

A

Get-Help

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

What powershell command shows hidden files during a directory search?

A

-force

eg:
ls -force c:\

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

Which powershell command will tell you what directory you’re currently in?

A

pwd
(print-working directory)

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

In order to change directory locations in powershell, what command is used?

A

cd followed by the path.
eg:

cd c:\Users\Name

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

To go up one path level in a powershell directory, what is the command?

A

cd ..

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

What is the powershell shortcut of the home directory?

A

cd ~

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

What is the command in Bash and Powershell to create a new directory(folder)?

A

mkdir _____

(Underscores=chosen file name)

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

In powershell, how do we work around not being able to use spaces in file or directory names?

A

either by ‘surrounding it with quotes’ or by following each word with a back tick, eg:

my’ file’ name’

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

In Bash, how do we get around not being able to use spaces in file or directory names?

A

either with ‘quotations’, or by entering a backslash between words, eg:

mkdir my/ file/ name/

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

How do we nagivate command history in powershell?

A

By typing in history, and hitting enter. Then we are able to scroll through commands with the up and down arrows

17
Q

What is the shortcut to search history in powershell?

A

cntrl and r keys, then searching

18
Q

How do we clear our text field in both powershell and bash for easier reading?

A

typing the clear command and hitting enter

19
Q

How do we open a list of directories in Bash?

A

ls/

20
Q

In a bash directory, what are:
bin
etc
home

A

bin= program file directory
etc = system configuration files
home = personal directory for users (documents, pictures etc)

21
Q

In a bash directory, what are:
proc
usr
var

A

proc = currently running processes
usr = user installed software
var = system logs or any constantly changing files

22
Q

In Bash, what command will show you all options and flags for any given command?

A

By typing –help after the command you need information about, eg:

ls –help

23
Q

How would you open the manual for a command in Bash?

A

By typing man before the command. (Known as man pages)

24
Q

What does the -l flag mean in Bash?

A

Long, you could use it to pull up a longer more detailed directory by typing:
ls -l/

25
Q

How would you search for hidden files in a Bash directory?

A

ls -a/
-a stands for all

26
Q

How would you identify a hidden file in Bash?

A

If the file name started with a period. EG:
.filename.txt

27
Q

What is the command to copy a file in powershell and Bash?

A

cp
eg:
cp filename.txt c:\Users\Documents

28
Q

What is a wildcard command?

A

Denoted by an asterix, you follow it with the parameter you would like applied to your file changes. eg:
cp * .jpg destinationpath

29
Q

Without using this command, the contents of a directory will not be changed during a command sequence

A

Recurse
-recurse in powershell
-r in Bash

30
Q

-verbose will output ________

A

one line per file

31
Q

To move a file, what is the command?

A

mv
eg:
mv ‘file name’ c:location

32
Q

To rename a file, what is the command?

A

mv
eg: ‘filename’ ‘newfilename’

33
Q

What is the command to delete files and directories?

A

rm

This immediately deletes though, no recycle bin purgatory for the item you use this command on!

34
Q
A