5-3 Configure Networking and Hostname Resolution Statically or Dynamically: Hostname Configuration Flashcards

1
Q

Start and Stop Network Manager

A

systemctl start NetworkManager
systemctl enable NetworkManager
systemctl restart network

If you get lost, use the man page for nmcli-examples to help when configuring nmcli

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

Display the systems fully qualified hostname

A

hostname

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

/etc/hostname — Manages the “static” hostname for the system. Rather than modifying the file,
you can use the hostnamectl command

hostname command can show and change hostname but is not persistent, need to update /etc/hostname file for persistence

hostnamectl is persistent, it updates /etc/hostname file

A

hostnamectl set-hostname system.domain.com

hostnamectl status

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

in /etc/resolv.conf file

search us-west-2.compute.internal

A

setup dns connections to first search for hostnames ending with given

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

in /etc/resolv.conf file

search us-west-2.compute.internal

A

setup dns connections to first search for hostnames ending with given us-west-2.compute.internal

so if only host1 is given for host1.us-west-2.compute.internal, it’ll still work

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

/etc/hosts

ip address) (domain name

A

poisin dns so hostname yahoo.com goes to 1.1.1.1

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

in /etc/hosts file
(ip address) (domain name)
1.1.1.1 yahoo.com

A

poison dns so hostname yahoo.com goes to 1.1.1.1

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

in /etc/hosts file

1.1.1.1 yahoo.com

A

poison dns so hostname yahoo.com goes to 1.1.1.1

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

/etc/resolv.conf is managed by Network Manager

A

Use network manager to edit /etc/resolv.conf

Or modify connection configuration directly in directory /etc/sysconfig/network-scripts

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

default system looks locally in
/etc/hosts first, before going to /etc/resolv.conf to look externally

how to change that behavior

A

in /etc/nsswitch.conf file

hosts: files dns hostname

means it’ll look locally at /etc/hosts, then nameserver in /etc/resolv.conf to look externall, then hostname

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