yum install net-tools for ifconfig

hostname

hostnamectl

-h –help              Show this help
–version           Show package version
–transient         Only set transient hostname
–static            Only set static hostname
–pretty            Only set pretty hostname
-P –privileged        Acquire privileges before execution
–no-ask-password   Do not prompt for password
-H –host=[USER@]HOST  Operate on remote host

Commands:
status                 Show current hostname settings
set-hostname NAME      Set system hostname
set-icon-name NAME     Set icon name for host
set-chassis NAME       Set chassis type for host

Ethernet CentOS/RHEL 6

vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=newHostName

vi /etc/hosts
127.0.0.1 newHostName localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 newHostName localhost localhost.localdomain localhost6 localhost6.localdomain6

nmcli d

DEVICE       TYPE      STATE      CONNECTION
eno16777728  ethernet  connected  eth0
eno33554960  ethernet  connected  eth1
lo           loopback  unmanaged  —

 

ifconfig ethx up

vi /etc/resolv.conf

vi /etc/sysconfig/network

vi /etc/sysconfig/network-scripts/ifcfg-eth0

service network restart

 

uuidgen

uuid=

disable ipv6

vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
sysctl -p

vi /etc/sysconfig/network-scripts/ifcfg-eno16777728
IPV6INIT=no
NETWORKING_IPV6=no

X11 forwarding request failed on channel 0

vi /etc/ssh/sshd_config
X11Forwarding yes
X11UseLocalhost no
systemctl restart ssh.service (Debian 7, CentOS/RHEL 7, Fedora)
service sshd restart (CentOS/RHEL 6)