Skip to main content

62 commands in Ubuntu



1. **ifconfig**: Display network interface information.
   Example: `ifconfig`

2. **ip addr**: Show IP addresses of network interfaces.
   Example: `ip addr show`

3. **ip route**: Display routing table information.
   Example: `ip route show`

4. **ping**: Test network connectivity.
   Example: `ping google.com`

5. **traceroute**: Trace the route to a destination.
   Example: `traceroute google.com`

6. **netstat**: Display network statistics and connections.
   Example: `netstat -an`

7. **ss**: Display socket statistics.
   Example: `ss -tuln`

8. **nslookup**: Perform DNS lookups.
   Example: `nslookup google.com`

9. **dig**: Another DNS lookup utility.
   Example: `dig google.com`

10. **route**: Manage the IP routing table.
    Example: `route -n`

11. **wget**: Download files from the web.
    Example: `wget https://example.com/file.txt`

12. **curl**: Transfer data to/from a server.
    Example: `curl https://example.com`

13. **ssh**: Securely connect to a remote host.
    Example: `ssh username@remote_host`

14. **scp**: Securely copy files between hosts.
    Example: `scp file.txt username@remote_host:/path/to/destination`

15. **telnet**: Connect to a remote host using the Telnet protocol.
    Example: `telnet remote_host`

16. **ftp**: Interact with remote FTP servers.
    Example: `ftp ftp.example.com`

17. **ifup**: Bring a network interface up.
    Example: `sudo ifup eth0`

18. **ifdown**: Bring a network interface down.
    Example: `sudo ifdown eth0`

19. **iwconfig**: Configure wireless network interfaces.
    Example: `iwconfig wlan0`

20. **hostname**: Display or set the system's hostname.
    Example: `hostname`

21. **ifstat**: Display interface statistics.
    Example: `ifstat`

22. **iftop**: Display bandwidth usage on an interface.
    Example: `iftop`

23. **arp**: Display or manipulate the ARP cache.
    Example: `arp -a`

24. **netcat (nc)**: Read and write data across network connections.
    Example: `nc -vz google.com 80`

25. **nmap**: Network discovery and security auditing.
    Example: `nmap -sP 192.168.1.0/24`

26. **route add**: Add a new route to the routing table.
    Example: `sudo route add -net 10.0.0.0/24 gw 192.168.1.1`

27. **route del**: Delete a route from the routing table.
    Example: `sudo route del default`

28. **iptables**: Configure firewall rules.
    Example: `sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT`

29. **ufw**: Uncomplicated Firewall management.
    Example: `sudo ufw enable`

30. **netcat (nc) listener**: Create a listening socket using netcat.
    Example: `nc -l -p 12345`

31. **netcat (nc) client**: Connect to a listening socket using netcat.
    Example: `nc remote_host 12345`

32. **lsof**: List open files and network connections.
    Example: `lsof -i`

33. **ipset**: Manage IP sets for firewall rules.
    Example: `sudo ipset create myset hash:ip`

34. **iftop**: Monitor network bandwidth usage in real-time.
    Example: `sudo iftop -i eth0`

35. **tcpdump**: Capture and analyze network packets.
    Example: `sudo tcpdump -i eth0 -n port 80`

36. **ifenslave**: Create a bonded interface (NIC teaming).
    Example: `sudo ifenslave bond0 eth0 eth1`

37. **mtr**: Network diagnostic tool that combines traceroute and ping.
    Example: `mtr google.com`

38. **ipcalc**: Calculate IP addresses, netmasks, and subnets.
    Example: `ipcalc 192.168.1.0/24`

39. **netplan**: Configure network settings using YAML files.
    Example: `/etc/netplan/01-netcfg.yaml`

40. **dhclient**: Obtain an IP address from a DHCP server.
    Example: `sudo dhclient eth0`

41. **host**: DNS lookup utility.
    Example: `host google.com`

42. **hostnamectl**: Control system hostname and related settings.
    Example: `hostnamectl set-hostname myhost`

43. **arping**: Send ARP requests to a host.
    Example: `arping -c 5 192.168.1.1`

44. **ip neigh**: Display ARP cache entries.
    Example: `ip neigh show`

45. **ip tunnel**: Manage IP tunnels.
    Example: `sudo ip tunnel add mytunnel mode gre local 192.168.1.1 remote 192.168.2.1`

46. **ifrename**: Rename network interfaces.
    Example: `sudo ifrename eth0 myeth0`

47. **route -A inet6**: Manage IPv6 routing table.
    Example: `sudo route -A inet6 -n`

48. **dhclient6**: Obtain IPv6 address from DHCPv6 server.
    Example: `sudo dhclient6 eth0`

49. **netstat -s**: Display network statistics by protocol.
    Example: `netstat -s`

50. **ipset**: Manage IP sets for firewall rules.
    Example: `sudo ipset create myset hash:ip`

51. **vnstat**: Network traffic monitoring tool.
    Example: `vnstat -l`

52. **ethtool**: Display or change Ethernet device settings.
    Example: `ethtool eth0`

53. **iw**: Configure wireless devices and their settings.
    Example: `iw dev wlan0 scan`

54. **hostapd**: Host Access Point Daemon for creating wireless APs.
    Example: `sudo hostapd /etc/hostapd/hostapd.conf`

55. **iwlist**: List nearby wireless networks.
    Example: `iwlist wlan0 scan`

56. **ip maddr**: Manage multicast addresses.
    Example: `ip maddr show dev eth0`

57. **dnsdomainname**: Display the system's DNS domain name.
    Example: `dnsdomainname`

58. **resolvectl**: Control the system's DNS settings.
    Example: `resolvectl status`

59. **ss -s**: Display socket statistics by protocol.
    Example: `ss -s`

60. **iftop -i**: Monitor bandwidth usage of a specific interface.
    Example: `sudo iftop -i eth0`

61. **nload**: Monitor network traffic and bandwidth usage.
    Example: `nload eth0`

62. **tcpdump -i**: Capture packets on a specific interface.
    Example: `sudo

Comments

Popular posts from this blog

12. Write a program to convert NFA to DFA.

Converting a Non-Deterministic Finite Automaton (NFA) to a Deterministic Finite Automaton (DFA) involves creating a new DFA where each state corresponds to a set of NFA states reachable under certain conditions. Below is a simple Python program to perform this conversion. I'll explain each line of code: ```python from collections import defaultdict def epsilon_closure(states, transitions, epsilon):     closure = set(states)     stack = list(states)          while stack:         state = stack.pop()         for next_state in transitions[state].get(epsilon, []):             if next_state not in closure:                 closure.add(next_state)                 stack.append(next_state)          return closure def nfa_to_dfa(nfa_states, nfa_transitions, alphabet, start_state, n...