Configure Hostnames and Name Resolution Flashcards

1
Q

How do you display current hostname?

A

hostname

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

How do you display hostname status?

A

hostnamectl status

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

How do you change the hostname and hostname configuration file?

A

hostnamectl hostname <domain></domain>

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

How do you look up the ip address of a server?

A

getent hosts <server></server>

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

What command do you update the file to add a server to access an IP address

A

vim /etc/hosts

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

What command do you use to view the hostname at network start?

A

cat /etc/hostname

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

What command do you use to look up the IP address of a server?

A

getent hosts class

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

What command do you use to ping a server?

A

ping -c3 <server></server>

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