Chapter 1+2 Flashcards

1
Q

ssh remoteuser@remotehost

A

Use Secure Shell (SSH) to log in to the remote Linux system remotehost as the user remoteuser

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

ssh -i mylab.pem remoteuser@remotehost

A

Specify the user’s private key file mylab.pem

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

exit command

A

terminate current shell session

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

passwd command

A

change the password for current user

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

whoami

A

get username

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

date

A

get date

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

date +[??]

A

Get the date in a specific format

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

cat file

A

view contents of a file

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

less file

A

view contents of a file page by page

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

head file

A

display the first 10 lines of a file

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

tail file

A

display last 10 lines of a file

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

head -n 15 file

A

display the first 15 lines of a file

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

head -n 20 file

A

display the last 20 lines of a file

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

wc -l file

A

display number of lines in a file

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

wc -w file

A

display the number of words in a file

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

wc -c file

A

display the number of characters in a file

17
Q

wc file

A

display the number of lines, words and characters in a file

18
Q

history

A

view list of previously executed commands