Dziesiate_21

 0    21 schede    michalesq
Stampa Gioca Testa il tuo livello
 
Domanda - Risposta -
Copy ACL between files
inizia ad imparare
getfacl file1 | setfacl --set-file=- file2
ACL - setting mask for the file to read only
inizia ad imparare
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
inizia ad imparare
setfacl -d -m u: starbuck: rwX dir1
Using setfacl, change the "other" permissions to none on file1.
inizia ad imparare
setfacl -m o:- file1
Remove the default permissions from dir1.
inizia ad imparare
setfacl --remove-default dir1
Displays all IPs on the machine
inizia ad imparare
ip addr
Displays IP of the particular device
inizia ad imparare
ip addr show eth0
Command which shows all hops to get the IP
inizia ad imparare
treceroute IP
Command to show all listening ports and established connections
inizia ad imparare
ss
Command to show all listening and established connection
inizia ad imparare
ss -a
Display all devices in the system
inizia ad imparare
ls /sys/class/net
Location of network-scripts
inizia ad imparare
cd /etc/sysconfig/network-scripts/
Command to add new network connection and create script in /etc/sysconfig/network-scripts/
inizia ad imparare
nmcli con add con-name "my connection" autoconnect yes type ethernet ifname eth1
Command to show network connections
inizia ad imparare
nmcli dev show
Command to add network connection with static IP and GW and create script in /etc/sysconfig/network-scripts/
inizia ad imparare
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
inizia ad imparare
/etc/nsswitch.conf
How to set hostname - not persistent?
inizia ad imparare
hostnamectl set-hostname <hostname>
How to set hostname - persistent?
inizia ad imparare
/etc/hostname
How to add DNS server with nmcli (this will modify /etc/sysconfig/network-scripts/ifcfg-eths0 and resolv. conf)?
inizia ad imparare
nmcli con mod "System eth0" ipv4. dns 8.8.8.8
How to display Google IP and domain name?
inizia ad imparare
getent hosts google.com
How to up and interface with nmcli?
inizia ad imparare
nmcli con up eths0

Devi essere accedere per pubblicare un commento.