Basic Linux Commands Flashcards

1
Q

List directory contents

A

ls - List files, directories, for long output do ls -l | more

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

Find text in a file

A

grep PATTERN [FILE]

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

Change current directory

A

cd - identical to windows, forward slashes instead of backwards /var/log

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

Shut down the system

A

shutdown, sudo shutdown 2 -r reboot cntrl c to cancel

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

Print Working Directory

A

pwd - displays the current working directory path

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

Change a user account password

A

passwd [username]

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

Move (rename) a file

A

mv SOURCE DEST

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

Copy a file

A

cp SOURCE DEST

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

Remove files or directories

A

rm - Does not remove directories by default, Directories must be empty or must be removed with -r

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

Make a directory

A

mkdir DIRECTORY

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

Change mode of a file system object

A

chmod - r,w,x, can also use octal notation, file owner u, group g, others o, all a

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

Change file owner and group

A

chown - sudo chown [OWNER:GROUP:] file

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

View or change wireless network configuration

A

iwconfig - requires knowledge of the wireless network - iwconfig eth0 essid studio-wireless

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

View or configure an interface and IP configuration

A

ifconfig eth0

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

View the current process

A

ps - Similar to the windows task manager -e all

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

Become a super user

A

su - you continue to be that user until you exit

17
Q

Execute a command as the super user

A

sudo - only that command executes as the super user

18
Q

Advanced Packaging Tool

A

apt-get handles the management of application packages > sudo apt-get install wireshark

19
Q

Visual mode editor

A

vi - Full screen editing with copy paste and more, insert text with i

20
Q

Covert and copy a file

A

dd - Backup and restore an entire partition > dd if= of= [Options]