• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/39

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

39 Cards in this Set

  • Front
  • Back

/etc/hostname

Debian/Ubuntu hostname location

/etc/sysconfig/network

Hostname location for RPM-based distributions

hostname

Will display the current hostname of the system.




You can optionally pass a new hostname to the command, and it will allow a change of hostname on the system during the current session only.

uname -a, uname -n

These commands will display the hostname information, and are universal across distributions.

127.0.1.1

When changing a hostname on Ubuntu you must also change the local call back hostname designated by this IP.

ifconfig -a

Displays a summary listing of all interfaces.

ifconfig {interface} down

Administratively brings down an interface.




Interface can be PPP, serial, ethernet, VPN, lo, etc.




Will only work on running and/or configured interfaces.

ifconfig {interface} up

Brings up an interface that was previously brought down administratively. Must be done from a console.




Interface can be PPP, serial, ethernet, VPN, lo, etc.




Will only work on running and/or configured interfaces.

ifdown -a

Will bring down all interfaces.

ifup -a

Will bring up all interfaces.

/etc/network/{interface}

This is the file location for the network interfaces on a Debian-based system (Debian/Ubuntu).

Sample Configuration for eth0 on Debian

auto eth0


iface eth0 inet static


address {IP address}


netmask {subnet mask}


network {network address}


broadcast {broadcast address}


gateway {default gw address}


dns-nameservers {nameservers}

/etc/sysconfig/network-scripts/{interface}

This is the file location for the network interfaces on a RPM-based system (CentOS/RHEL).

Sample Configuration for eth0 on CentOS/RHEL

DEVICE=eth0


BOOTPROTO=static


ONBOOT=yes


HWADDR={MAC address}


IPADDR={IP address}


NETMASK={subnet mask}


GATEWAY={default gateway}


TYPE=Ethernet



route -n

Used to view routing information and skip name resolution.

netstat -rn

Alternate way to view routing information without performing name resolution.

sudo route add default gw {gateway IP}

Command to add a default gateway route.

sudo route del default gw {gateway IP}

Command to remove a default gateway route.

sudo route add -host {IP} reject

Command to reject access to a host/network despite a default route to that network being available.

sudo route del -host {IP} reject

Command to remove a route rejecting access.

sudo route add -net {network address} netmask {subnet mask} gw {default gateway address}

This command will add access to a network with no default gateway, or specify a different gateway to use to access a network.

/etc/resolv.conf

This is the distribution independent location for information about nameservers.

/etc/resolv.conf in RPM-based distributions

In an RPM-based distribution you can simply edit this file to add information about DNS/nameservers, and it will carry changes between sessions.

/etc/resolvconf/resolveconf.d

In a Debian-based distribution you can edit /etc/resolv.conf, but the configuration will be overwritten on reboot. Instead you must edit the files in this directory.

resolveconf -u

Command to update (rebuild) namesevrer information in a Debian-based distribution after making changes.

/etc/nsswitch.conf

File contains a list of system databases and name service configurations.



This file is associated with the name service caching daemon (nscd), though nscd does not have to be installed (and often is not).




If nscd is installed, it needs to be restarted whenever changes to this file are made.



ICMP

Acronym for Internet Control Message Protocol. This is a stateless protocol used to query messages.

ping

This is a stateless tool that is part of ICMP and is used to send query packets to determine if systems are responding.




It sends a specifically formatted 56byte ICMP packet and expects a specifically formatted 64byte package in return.

ping -a

This command will beep/flash on some terminals when running a ping command.

ping -A

This command is the Adaptive ping. It provides a faster ping as packets are sent in sequence, but not waiting for a response.

ping -c

This command sends a count (#) of packets, and then stops, displaying summary.

ping -f

This command is commonly referred to as a ping flood, and can only be run by root or someone with sudo access. It will send out as many packets to the destination IP as the network interface will handle.

ping -I

This command will send a ping with the delay interval specified.

ping -n

This command will send a ping and return IP information only, does not attempt to do DNS lookups.

ping -D

This command will print a date/timestamp with each line.

ping -q

Nothing is printed during this ping command, only summary information is printed once the ping is stopped.

ping -w

This command sets a deadline - it will only wait a specified number of seconds between each ping SEND waiting for an ACK before moving on.

ping -v

This command is a verbose ping, and it gives more transmission information than just SEND/ACK.

/etc/hosts

Universal location of the hosts file, regardless of distribution.




Contains information about hosts and corresponding IPs as well as 'localhost' designations.