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

6. Generate a YACC specification to recognize a valid arithmetic expression that uses operators +, – , *,/ and parenthesis.

Below is a YACC specification for recognizing valid arithmetic expressions that involve operators (+, -, *, /) and parentheses. I'll explain each line of the code afterward: ```yacc %{ #include <stdio.h> %} %token NUMBER %left '+' '-' %left '*' '/' %% expression: expression '+' expression            | expression '-' expression            | expression '*' expression            | expression '/' expression            | '(' expression ')'            | NUMBER            ; %% int yylex() {     // Code for tokenizing input and returning tokens } void yyerror(const char *s) {     fprintf(stderr, "Error: %s\n", s); } int main() {     yyparse();     return 0; } ``` Now, let's break down the YACC specification line by line: 1. `%{` ... `%}`: This is the C code section where y...

1, Design and implement a lexical analyzer using C language to recognize all valid tokens in the input program. The lexical analyzer should ignore redundant spaces, tabs and newlines. It should also ignore comments

#include <stdio.h> #include <ctype.h> int main() {     char c;     while ((c = getchar()) != EOF) {         if (isspace(c)) {             // Ignore whitespace, tabs, and newlines             continue;         }         if (c == '/') {             // Check for comments             char nextChar = getchar();             if (nextChar == '/') {                 while ((nextChar = getchar()) != '\n');         ...

17. Write a program to perform constant propagation.

Sure, I can provide you with a basic example of a constant propagation program along with explanations for each line. Please note that this example is simplified and might not cover all possible cases of constant propagation. ```c #include <stdio.h> #include <stdbool.h> // Structure to represent an assignment statement struct Assignment {     char variable;     int value;     bool isConstant; }; int main() {     // Example assignments (variable, value, isConstant)     struct Assignment assignments[] = {         {'a', 10, true},         {'b', 20, true},         {'c', 0, true},         {'d', 30, false},         {'e', 0, false}     };     int numAssignments = sizeof(assignments) / sizeof(assignments[0]);     // Perform constant propagation     for (int i = 0; i < numAssignments; i++) { ...