Common linux and git commands
Some common linux commands are - ls - show current files and directories ls -l - show files and directories with permissions cd - change directory hostname - shows the host device name ifconfig - display IP and MAC address top - show all running processes cat filename - shows the contents of the “filename” mkdir - create directories rm -rf dirname - removes directory and inside files. -r is for recursive and -f is for force. history - see the history of all the commands. ping host-ip - Check connectivity between hosts chmod 777 filename - Assign read, write and execute permissions(rwx) to owner, group and others. chmod -x filename - Remove execute functionality of file. chown - change owner and group ownership of file netstat -tulpn - check open ports which are listening of tcp and udp with their pid. tcp dump port_number - check packets incoming and outgoing to the given port number alias command to create a command alias such as alias lh="ls -lrth" and so later, when u do lh, it runs same as ls -lrth brctl show -Shows information about the bridge network and veth interfaces it is connected to and its attached ports of veth pair in kubernetes route- check the route table ip addr - Displays the addresses for every link configured on the system, same as ip a ip link sh - Inspect the network configuration within pod ethtool -S eth0 or veth12abcd - query or control network driver and hardware settings with statistics flag ip route sh - Show route table, same as route -n ping ip - shows connectivity to the IP(cannot use port) nc -vz ip_addr port - Checks tcp connectivity nc -vz 10.99.52.54 30080 traceroute - Shows route of packet flow traceroute ip w or sudo w - check current logged in session for terminal pv - monitor progress of a command execution pv file.tar.gz > /tmp/file.tar.gz htop - see current cpu utilization free -kh - see memory usage du -sh - see disk utilisation Git commands git rev-parse --short HEAD - get the latest commitId ...