Chapter 1 - Getting Start w The Basics Flashcards

1
Q

/root

A

The home directory of the root user

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

/etc

A

Contains the Linux config files - files that control when and how programs start up

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

/home

A

The user’s home directory

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

/mnt

A

Where other filesystems are attached or mounted to the filesystem

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

/media

A

Where CDs and USB devices are usually attached or mounted to the filesystem

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

/bin

A

Where application binaries (the equivalent of executables in Microsoft Windows or applications in macOS) reside

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

/lib

A

Where you’ll find libraries (shared programs that are similar to Windows DLLs)

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

Command

Returns your location within the directory structure.

A

pwd

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

Command

To move up one level in the file structure (towards the root)

A

cd ..

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

Command

To move up two levels in the file structure (towards the root)

A

cd ../..

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

Command

To move up three levels in the file structure (towards the root)

A

cd ../../..

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

Command

Move up to the root level in the file structure

A

cd /

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

Command

To get more information about the files and directories, such as their permissions, owner, size, and when they were last modified

A

ls -l

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

Show hidden files

A

ls -a

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

Three options for help?

A

-h
–help
-?

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

Command for manual pages

A

man [command]

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

How do you navigate MAN pages?

A

ENTER - scroll
Page Up/Down + Arrow keys
Quit - Q

18
Q

Command to go through entire filesystem and find every occurrence of a word

A

locate

Ex. locate aircrack-ng

19
Q

Command to locate a binary file, its source, and man page

A

whereis

Ex. whereis aircrack-ng

20
Q

Command to only return the location of the binaries in the PATH variable in Linux

A

which

21
Q

Command which begins your search in any designated directory and looking for a number of different parameters like name + date of creation

A

find

22
Q

Syntax for find

A

find directory options expressions

Ex. find / -type f -name apache2

Finds a file with the name apache2 starting from the root directory

23
Q

What separates find from other search commands?

A

Find displays only exact name matches

Must use wildcard like * . , ? []

24
Q

What is ? used for?

A

To replace a single character

25
Q

What is [] used for?

A

To match the characters the appear inside the square brackets

26
Q

What is * used for?

A

Matches ANY characters of ANY length

27
Q

Command to display info about processes running on the machine

A

ps

28
Q

Command used as a filter to search for keywords. Mostly used when output is piped from one command to another

A

grep

29
Q

Used to display contents of a file but to also create small files

A

cat

30
Q

Use cat command to create a file

A

cat > [name of file]
then type in the contents here
then type CTRL + D

31
Q

Command to append/add to file

A

Use cat&raquo_space; [name of file]

32
Q

Command to overwrite what already exists in the file

A

cat > [name of file]

33
Q

Command to create a new file [if it doesn’t already exist]

A

touch

34
Q

Command to create new directory in Linux

A

mkdir

35
Q

Command to create a duplicate of a file in the new location

A

cp [name of file] [directory of where to go]

EX. cp oldfile /root/newdirectory/

36
Q

Command to create a duplicate of a file in the new location with a new name

A

cp [name of file] [directory of where to go]/newname

EX. cp oldfile /root/newdirectory/newfile

37
Q

Command to move a file or directory to a new location

A

mv

38
Q

Command to rename a file

A

mv

Ex. mv newfile newfile2
[Renames newfile to newfile2]

39
Q

Command to remove a file

A

rm

40
Q

Command to remove a directory

A

rmdir [name of directory]

41
Q

Command to remove directory even if it contains contents

A

rm -r [name of directory]