Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views1 page

Linux

The document provides a series of Linux commands for managing file ownership and network configurations. It includes commands for changing file ownership, adding/removing IP addresses, setting static IPs, configuring DHCP, and managing firewall settings. Additionally, it contains a command for joining a Kubernetes cluster using kubeadm.

Uploaded by

Tony Sandy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Linux

The document provides a series of Linux commands for managing file ownership and network configurations. It includes commands for changing file ownership, adding/removing IP addresses, setting static IPs, configuring DHCP, and managing firewall settings. Additionally, it contains a command for joining a Kubernetes cluster using kubeadm.

Uploaded by

Tony Sandy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

sudo chown pavan file.

txt Change only the owner to pavan


sudo chown pavan:developers file.txt Change both owner and group
sudo chown -R pavan:developers /directory/ Change ownership recursively
sudo chown pavan: file.txt Change owner only, keep current group
sudo chown :developers file.txt Change group only, keep current owner
sudo chown --reference=oldfile.txt newfile.txt Copy ownership from another file

Add an IP (temporary) sudo ip addr add 192.168.1.200/24 dev eth0


Remove an IP sudo ip addr del 192.168.1.200/24 dev eth0
Make it permanent Edit /etc/netplan/01-netcfg.yaml
Apply changes sudo netplan apply
Show current IPs ip a

Show network interfaces ip a


Set static IP sudo ip addr add 192.168.1.200/24 dev eth0
Configure static IP permanently Edit /etc/netplan/01-netcfg.yaml
Enable DHCP dhcp4: yes in Netplan
Change DNS Edit /etc/resolv.conf or Netplan
Check current routes ip route show
Add default gateway sudo ip route add default via 192.168.1.1 dev eth0
Restart network service sudo systemctl restart systemd-networkd
Test connectivity ping -c 4 8.8.8.8
Test DNS nslookup google.com
Show open ports sudo netstat -tulnp
Enable/disable interface sudo ip link set eth0 up/down
Enable firewall sudo ufw enable
Allow SSH in firewall sudo ufw allow 22/tcp

kubeadm join 10.0.2.15:6443 --token 98reix.985rlhpv8jgn7n3w \


--discovery-token-ca-cert-hash
sha256:f28e1ed1a17c07771fbaf893dc2e6f497fd7ec5909d2abaefa12d55f465881d7

You might also like