Dziesiate_21

 0    21 フィッシュ    michalesq
印刷 遊びます 自分をチェック
 
質問 - 答え -
Copy ACL between files
学び始める
getfacl file1 | setfacl --set-file=- file2
ACL - setting mask for the file to read only
学び始める
setfacl -m m: r file1
Set the default permissions on dir1 to read, write and execute for the starbuck user; execute only if it is a directory
学び始める
setfacl -d -m u: starbuck: rwX dir1
Using setfacl, change the "other" permissions to none on file1.
学び始める
setfacl -m o:- file1
Remove the default permissions from dir1.
学び始める
setfacl --remove-default dir1
Displays all IPs on the machine
学び始める
ip addr
Displays IP of the particular device
学び始める
ip addr show eth0
Command which shows all hops to get the IP
学び始める
treceroute IP
Command to show all listening ports and established connections
学び始める
ss
Command to show all listening and established connection
学び始める
ss -a
Display all devices in the system
学び始める
ls /sys/class/net
Location of network-scripts
学び始める
cd /etc/sysconfig/network-scripts/
Command to add new network connection and create script in /etc/sysconfig/network-scripts/
学び始める
nmcli con add con-name "my connection" autoconnect yes type ethernet ifname eth1
Command to show network connections
学び始める
nmcli dev show
Command to add network connection with static IP and GW and create script in /etc/sysconfig/network-scripts/
学び始める
nmcli con add con-name "my connection" autoconnect yes type ethernet ifname eth1 ip4 10.0.0.0 gw4 10.0.0.1
File where we can modify if Kernel should look to resolv. conf or /etc/hosts for finding IPs and names
学び始める
/etc/nsswitch.conf
How to set hostname - not persistent?
学び始める
hostnamectl set-hostname <hostname>
How to set hostname - persistent?
学び始める
/etc/hostname
How to add DNS server with nmcli (this will modify /etc/sysconfig/network-scripts/ifcfg-eths0 and resolv. conf)?
学び始める
nmcli con mod "System eth0" ipv4. dns 8.8.8.8
How to display Google IP and domain name?
学び始める
getent hosts google.com
How to up and interface with nmcli?
学び始める
nmcli con up eths0

コメントを投稿するにはログインする必要があります。