Linux Networking Flashcards

1
Q

Sudo [command]

A

Sue - Doo

Admin rights request with following command

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

su

A

Same as sudo, S U into root

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

ifconfig

Bring down or up interfaces?

Will these changes be permanent?

A

Adjust network Interfaces and view current state

ifconfig eth0 up 10.10.10.1 netmask 255.255.255.0

Up = means online

ifup eth0 and ifdown eth0
To bring up or shut down the eth0 interface

Not permanent. Need to find config to do this which is different depending on the distro

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

Where can you make permanent changes to the interfaces?

A

It’s different depending on the distro.
In red hat it’s
/etc/sysconfig/network-scripts

Debian
/etc/network/interfaces

Inside you’ll find a bunch of scripts that run when your system boots up and it turns on network services.
There will be a script for each network interfaces.

Edit these scripts to make them permanent.

Example
Bootproto=“static”
Ipaddr=“10.10.10.2”
Netmask=“255.255.255.0”
Gateway=“10.10.10.1”
NM_CONTROLLED=“no”

Usually don’t need “ unless there are spaces

If NM_CONTROLLED is on
that stands for Network manager, in red hat this automatically set up these scripts. If we are to
Manage these configurations directly, we need to shut off network manager.

ONBOOT=yes it means the system will auto connect it to the interface on boot

UUID is the universal ID. We don’t need this or Ethernet type since the system will auto figure some of this out, but some things are mandatory for connectivity.

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

How do you turn off network manager?

A

On upstart systems run
chkconfig NetworkManager off
Then
service NetworkManager stop

If you were on a system D system run
systemctl disable NetworkManager
Then
systemctl stop NetworkManager.service

Then reboot or just restart network service and it will run the new script.
service network restart

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