SlideShare a Scribd company logo
1 of 18
Computer Networks (CS C461 / IS C461)
                           Assignments
                             PART A
1)ip:
Name: show / manipulate routing, devices, policy routing and tunnels .
Synopsis:
ip [ OPTIONS ] OBJECT { COMMAND | help }

OBJECT := { link | addr | addrlabel | route | rule | neigh | tunnel | maddr | mroute | monitor }

OPTIONS := { -V[ersion] | -s[tatistics] | -r[esolve] | -f[amily] { inet | inet6 | ipx | dnet | link } | -o[neline] }

Examples:
       ip link show : List network interfaces




       ip link set dev eth0 name eth1 :         Rename interface eth0 to eth1
Computer Networks (CS C461 / IS C461)
                         Assignments
                           PART A

      ip link set dev eth0 up :Bring interface eth0 up (or down)
      ip addr show : List addresses for interfaces




      ip route show :List routing table




      ip route add default via 10.3.10.1:   Set default gateway to 10.3.10.1



2)nc:
NAME: nc — arbitrary TCP and UDP connections and listens.
SYNOPSIS:       nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p source_port]
                [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol] [-x
               proxy_address[:port]] [hostname] [port[s]]
DESCRIPTION:
  The nc (or netcat) utility is used for just about anything under the sun
  involving TCP or UDP. It can open TCP connections, send UDP packets,
  listen on arbitrary TCP and UDP ports, do port scanning, and deal with
  both IPv4 and IPv6. Unlike telnet(1), nc scripts nicely, and separates
  error messages onto standard error instead of sending them to standard
  output, as telnet(1) does with some.
Computer Networks (CS C461 / IS C461)
                         Assignments
                           PART A
Examples:
    nc host port: where host is the IP address or DNS name of a host to connect to and port is the TCP
      port number to connect to. By default, netcat uses TCP. Unlike telnet, netcat doesn't print
      anything to the screen when a connection is made unless you use the -v command line option.




      To scan ports command used is : nc -z 10.3.10.36 10-100 and to show close ports too include –v:
       nc -vz 10.3.10.36 10-100




3)ssh:
NAME: ssh — OpenSSH SSH client (remote login program).

SYNOPSIS:

         ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D
           [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] [user@]hostname [command]
Computer Networks (CS C461 / IS C461)
                          Assignments
                            PART A
DESCRIPTION:

          ssh (SSH client) is a program for logging into a remote machine and for
          executing commands on a remote machine. It is intended to replace rlogin
          and rsh, and provide secure encrypted communications between two
          untrusted hosts over an insecure network. X11 connections and arbitrary
          TCP ports can also be forwarded over the secure channel.

Examples:
      ssh user@hostname




4)scp:
NAME: scp — secure copy (remote file copy program).

SYNOPSIS:

scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]

[-l limit] [-o ssh_option] [-P port] [-S program]

[[user@]host1:]file1 ... [[user@]host2:]file
Computer Networks (CS C461 / IS C461)
                          Assignments
                            PART A
DESCRIPTION:

scp copies files between hosts on a network. It uses ssh(1) for data

transfer, and uses the same authentication and provides the same security

 as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if

they are needed for authentication.

 File names may contain a user and host specification to indicate that the

file is to be copied to/from that host. Local file names can be made

explicit using absolute or relative pathnames to avoid scp treating file

names containing ‘:’ as host specifiers. Copies between two remote hosts

are also permitted.

Examples:

      scp sampletextfile.txt your_username@remotehost.edu:/some/remote/directory




      scp your_username@remotehost.edu:samplefile.txt /some/local/directory
Computer Networks (CS C461 / IS C461)
                        Assignments
                          PART A
    5)arp:
    NAME: arp - manipulate the system ARP cache.
    SYNOPSIS:
       arp [-vn] [-H type] [-i if] [-a] [hostname]

        arp [-v] [-i if] -d hostname [pub]

        arp [-v] [-H type] [-i if] -s hostname hw_addr [temp]

        arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub

        arp [-v] [-H type] [-i if] -Ds hostname ifname [netmask nm] pub

       arp [-vnD] [-H type] [-i if] -f [filename]
    DESCRIPTION:
       Arp manipulates or displays the kernel's IPv4 network neighbour cache.
       It can add entries to the table, delete one or display the current con‐
       tent.

        ARP stands for Address Resolution Protocol, which is used to find the
        media access control address of a network neighbour for a given IPv4
        Address.

    Examples:
   arp -a




   arp –a ip
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A

   Delete an ARP entry: arp -d




    6)rarp:
    NAME: rarp - manipulate the system RARP table
    SYNOPSIS:
         rarp [-V] [--version] [-h] [--help]
         rarp -a
         rarp [-v] -d hostname ...
         rarp [-v] [-t type] -s hostname hw_addr
     DESCRIPTION:
      Arp manipulates or displays the kernel's IPv4 network neighbour cache.
      It can add entries to the table, delete one or display the current con‐
      tent.
      ARP stands for Address Resolution Protocol, which is used to find the
      media access control address of a network neighbour for a given IPv4
      Address.

    Examples:
   rarp –a
    aniket@ubuntu:~$ rarp -a
    This kernel does not support RARP.
Computer Networks (CS C461 / IS C461)
                       Assignments
                         PART A
    7)route:
    NAME: route - show / manipulate the IP routing table.
    SYNOPSIS:
       route [-CFvnee]

       route [-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw]
           [metric N] [mss M] [window W] [irtt I] [reject] [mod] [dyn]
           [reinstate] [[dev] If]

       route [-v] [-A family] del [-net|-host] target [gw Gw] [netmask Nm]
           [metric N] [[dev] If]

       route [-V] [--version] [-h] [--help]
     DESCRIPTION:
       Route manipulates the kernel's IP routing tables. Its primary use is
       to set up static routes to specific hosts or networks via an interface
       after it has been configured with the ifconfig(8) program.

       When the add or del options are used, route modifies the routing
       tables. Without these options, route displays the current contents of
       the routing tables.
    Examples:
   route
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A

   route add default gw 10.3.10.1 eth0




    8)netstat:
    NAME: netstat - Print network connections, routing tables, interface statistics, masquerade
    connections, and multicast memberships.
    SYNOPSIS:
        netstat [address_family_options] [--tcp|-t] [--udp|-u] [--raw|-w] [--listening|-l] [--all|-a]
    [--numeric|-n] [--numeric-hosts] [--numeric-ports]
        [--numeric-users] [--symbolic|-N] [--extend|-e[--extend|-e]] [--timers|-o] [--program|-p] [--
    verbose|-v] [--continuous|-c]

       netstat {--route|-r} [address_family_options] [--extend|-e[--extend|-e]] [--verbose|-v] [--
    numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users]
       [--continuous|-c]

       netstat {--interfaces|-i} [--all|-a] [--extend|-e[--extend|-e]] [--verbose|-v] [--program|-p] [--
    numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-
       users] [--continuous|-c]

        netstat {--groups|-g} [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [--
    continuous|-c]

       netstat {--masquerade|-M} [--extend|-e] [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--
    numeric-users] [--continuous|-c]

        netstat {--statistics|-s} [--tcp|-t] [--udp|-u] [--raw|-w]

        netstat {--version|-V}

        netstat {--help|-h}
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A
    DESCRIPTION:
       Netstat prints information about the Linux networking subsystem.

    Examples:

   List All Ports (both listening and non listening ports : netstat -a (-u if for udp ports)




   show statistics for all ports using netstat –s
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A



   Display the kernel routing information using netstat –r




   Show the list of network interfaces: netstat -i




    9)ifup:
    NAME: ifup - bring a network interface up.
    SYNOPSIS:
       ifup [-nv] [--no-act] [--verbose] [-i FILE|--interfaces=FILE] [--allow
       CLASS] -a|IFACE...
       ifup -h|--help
       ifup -V|--version
    DESCRIPTION:
       The ifup and ifdown commands may be used to configure (or, respec‐
       tively, deconfigure) network interfaces based on interface definitions
       in the file /etc/network/interfaces.
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A


    10)ifdown:
    NAME: take a network interface down
    SYNOPSIS:
           ifdown [-nv] [--no-act] [--verbose] [-i FILE|--interfaces=FILE]
            [--allow CLASS] -a|IFACE...
    DESCRIPTION:
       The ifup and ifdown commands may be used to configure (or, respec‐
       tively, deconfigure) network interfaces based on interface definitions
       in the file /etc/network/interfaces.
    Examples(ifup and ifdown examples are provided together):
   sudo ifup lo/ sudo ifdown lo




    11)iwconfig:
    NAME: iwconfig - configure a wireless network
    SYNOPSIS:
       iwconfig [interface]
       iwconfig interface [essid X] [nwid N] [mode M] [freq F]
                  [channel C][sens S ][ap A ][nick NN ]
                  [rate R] [rts RT] [frag FT] [txpower T]
                  [enc E] [key K] [power P] [retry R]
                  [modu M] [commit]
       iwconfig --help
       iwconfig –version
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A

    DESCRIPTION:
       Iwconfig is similar to ifconfig(8), but is dedicated to the wireless
       interfaces. It is used to set the parameters of the network interface
       which are specific to the wireless operation (for example : the fre‐
       quency). Iwconfig may also be used to display those parameters, and
       the wireless statistics (extracted from /proc/net/wireless).

       All these parameters and statistics are device dependent. Each driver
       will provide only some of them depending on hardware support, and the
       range of values may change

    Examples:
   iwconfig(output is given for both with and without wireless connections)
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A

    12)iwspy:
    NAME: iwspy - Get wireless statistics from specific nodes.
    SYNOPSIS:
       iwspy [interface]
       iwspy interface [+] DNSNAME | IPADDR | HWADDR [...]
       iwspy interface off
       iwspy interface setthr low high
       iwspy interface getthr
       DESCRIPTION:
       Iwspy is used to set a list of addresses to monitor in a wireless net‐
       work interface and to read back quality of link information for each of
       those. This information is the same as the one available in
       /proc/net/wireless : quality of the link, signal strength and noise
       level.

        This information is updated each time a new packet is received, so each
        address of the list adds some overhead in the driver.

        Note that this functionality works only for nodes part of the current
        wireless cell, you can not monitor Access Points you are not associated
        with (you can use Scanning for that) and nodes in other cells. In Man‐
        aged mode, in most case packets are relayed by the Access Point, in
        this case you will get the signal strength of the Access Point. For
        those reasons this functionality is mostly useful in Ad-Hoc and Master
        mode.

    Examples:
   sudo iwspy eth0
    Output:
    aniket@ubuntu:~$ sudo iwspy eth0
    eth0 Interface doesn't support wireless statistic collection
Computer Networks (CS C461 / IS C461)
                  Assignments
                    PART A
13)iwlist:
NAME: iwlist - Get more detailed wireless information from a wireless inter‐
    Face.
SYNOPSIS:
    iwlist [interface] scanning
    iwlist [interface] frequency
    iwlist [interface] rate
    iwlist [interface] keys
    iwlist [interface] power
    iwlist [interface] txpower
    iwlist [interface] retry
    iwlist [interface] event
    iwlist [interface] auth
    iwlist [interface] wpakeys
    iwlist [interface] genie
    iwlist [interface] modulation
    iwlist --help
    iwlist –version
  DESCRIPTION:
    Iwlist is used to display some additional information from a wireless
    network interface that is not displayed by iwconfig(8). The main argu‐
    ment is used to select a category of information, iwlist displays in
    detailed form all information related to this category, including
    information already shown by iwconfig(8).
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A
    Examples:
   iwlist wlan0 scan




    14)tracepath:
    NAME: tracepath, tracepath6 - traces path to a network host discovering MTU
       along this path.
    SYNOPSIS:
       tracepath [-n] [-b] [-l pktlen] destination [port]
    DESCRIPTION:
       It traces path to destination discovering MTU along this path. It uses
       UDP port port or some random port. It is similar to traceroute, only
       does not require superuser privileges and has no fancy options.

        tracepath6 is good replacement for traceroute6 and classic example of
        application of Linux error queues. The situation with IPv4 is worse,
        because commercial IP routers do not return enough information in icmp
        error messages. Probably, it will change, when they will be updated.
        For now it uses Van Jacobson's trick, sweeping a range of UDP ports to
        maintain trace history.
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A

    Examples:
   tracepath localhost




   tracepath -b localhost(-b resolves ip address)




   tracepath from localhost(of bits mail server)
Computer Networks (CS C461 / IS C461)
                      Assignments
                        PART A
    15)dhclient:
    NAME: dhclient - Dynamic Host Configuration Protocol Client.
    SYNOPSIS:
       dhclient [ -p port ] [ -d ] [ -e VAR=value ] [ -q ] [ -1 ] [ -r ] [ -x
       ] [ -lf lease-file ] [ -pf pid-file ] [ -cf config-file ] [ -sf
       script-file ] [ -s server ] [ -g relay ] [ -n ] [ -nw ] [ -w ] [ if0 [
       ...ifN ] ]
    DESCRIPTION:
       The Internet Systems Consortium DHCP Client, dhclient, provides a means
       for configuring one or more network interfaces using the Dynamic Host
       Configuration Protocol, BOOTP protocol, or if these protocols fail, by
       statically assigning an address.

    Examples:
   sudo dhclient eth0

More Related Content

What's hot

Software Process Models
Software Process ModelsSoftware Process Models
Software Process ModelsHassan A-j
 
OOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - LabOOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - LabVicter Paul
 
Software Requirements Specification on Student Information System (SRS on SIS)
Software Requirements Specification on Student Information System (SRS on SIS)Software Requirements Specification on Student Information System (SRS on SIS)
Software Requirements Specification on Student Information System (SRS on SIS)Minhas Kamal
 
Online Attendance Management System
Online Attendance Management SystemOnline Attendance Management System
Online Attendance Management SystemRIDDHICHOUHAN2
 
Command center processing and display system replacement (ccpds-r) - Case Study
Command center processing and display system  replacement (ccpds-r) - Case StudyCommand center processing and display system  replacement (ccpds-r) - Case Study
Command center processing and display system replacement (ccpds-r) - Case StudyKuppusamy P
 
Operating system security
Operating system securityOperating system security
Operating system securityRachel Jeewa
 
User Interface Analysis and Design
User Interface Analysis and DesignUser Interface Analysis and Design
User Interface Analysis and Design Saqib Raza
 
Substitution techniques
Substitution techniquesSubstitution techniques
Substitution techniquesvinitha96
 
Project report college information management system on Advanced Java
Project report college information management system on Advanced JavaProject report college information management system on Advanced Java
Project report college information management system on Advanced JavaRishabh Kumar ☁️
 
Crime Record Management System (CRMS)
Crime Record Management System (CRMS)Crime Record Management System (CRMS)
Crime Record Management System (CRMS)Zara Tariq
 
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational CalculusAmiya9439793168
 
Student management system
Student management systemStudent management system
Student management systemAmit Gandhi
 
Synopsis of online student feedback system(cse)
Synopsis of online student feedback system(cse)Synopsis of online student feedback system(cse)
Synopsis of online student feedback system(cse)shindept123
 
College Management System project
College Management System projectCollege Management System project
College Management System projectManish Kushwaha
 

What's hot (20)

Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
Student information system
Student information systemStudent information system
Student information system
 
Computer Worms
Computer WormsComputer Worms
Computer Worms
 
OOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - LabOOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - Lab
 
Software Requirements Specification on Student Information System (SRS on SIS)
Software Requirements Specification on Student Information System (SRS on SIS)Software Requirements Specification on Student Information System (SRS on SIS)
Software Requirements Specification on Student Information System (SRS on SIS)
 
System testing
System testingSystem testing
System testing
 
Online Attendance Management System
Online Attendance Management SystemOnline Attendance Management System
Online Attendance Management System
 
A2
A2A2
A2
 
Command center processing and display system replacement (ccpds-r) - Case Study
Command center processing and display system  replacement (ccpds-r) - Case StudyCommand center processing and display system  replacement (ccpds-r) - Case Study
Command center processing and display system replacement (ccpds-r) - Case Study
 
Operating system security
Operating system securityOperating system security
Operating system security
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
 
User Interface Analysis and Design
User Interface Analysis and DesignUser Interface Analysis and Design
User Interface Analysis and Design
 
Substitution techniques
Substitution techniquesSubstitution techniques
Substitution techniques
 
Virus
VirusVirus
Virus
 
Project report college information management system on Advanced Java
Project report college information management system on Advanced JavaProject report college information management system on Advanced Java
Project report college information management system on Advanced Java
 
Crime Record Management System (CRMS)
Crime Record Management System (CRMS)Crime Record Management System (CRMS)
Crime Record Management System (CRMS)
 
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
 
Student management system
Student management systemStudent management system
Student management system
 
Synopsis of online student feedback system(cse)
Synopsis of online student feedback system(cse)Synopsis of online student feedback system(cse)
Synopsis of online student feedback system(cse)
 
College Management System project
College Management System projectCollege Management System project
College Management System project
 

Similar to Basic linux commands

Arp Dan Ipconfig Syntax
Arp Dan Ipconfig  SyntaxArp Dan Ipconfig  Syntax
Arp Dan Ipconfig Syntaxguestcc37e8c
 
Introduction to tcpdump
Introduction to tcpdumpIntroduction to tcpdump
Introduction to tcpdumpLev Walkin
 
Lession3 Routing
Lession3 RoutingLession3 Routing
Lession3 Routingleminhvuong
 
Command.pptx presentation
Command.pptx presentationCommand.pptx presentation
Command.pptx presentationAkshay193557
 
11 module configuring novell ipx
11  module configuring novell ipx11  module configuring novell ipx
11 module configuring novell ipxAsif
 
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate028c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02Anand Nandani
 
DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1
DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1
DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1Felipe Prado
 
Ciso 4 ospf
Ciso 4 ospfCiso 4 ospf
Ciso 4 ospfmyciokas
 
Cisco asa firewall command line technical guide
Cisco asa firewall command line technical guideCisco asa firewall command line technical guide
Cisco asa firewall command line technical guideMDEMARCOCCIE
 

Similar to Basic linux commands (20)

Arp Dan Ipconfig Syntax
Arp Dan Ipconfig  SyntaxArp Dan Ipconfig  Syntax
Arp Dan Ipconfig Syntax
 
CN 1.docx
CN 1.docxCN 1.docx
CN 1.docx
 
nwlab-ex1.pdf
nwlab-ex1.pdfnwlab-ex1.pdf
nwlab-ex1.pdf
 
Introduction to tcpdump
Introduction to tcpdumpIntroduction to tcpdump
Introduction to tcpdump
 
Computer networks
Computer networksComputer networks
Computer networks
 
Tcpdump
TcpdumpTcpdump
Tcpdump
 
Routing
RoutingRouting
Routing
 
Lession3 Routing
Lession3 RoutingLession3 Routing
Lession3 Routing
 
Command.pptx presentation
Command.pptx presentationCommand.pptx presentation
Command.pptx presentation
 
11 module configuring novell ipx
11  module configuring novell ipx11  module configuring novell ipx
11 module configuring novell ipx
 
Ns2 introduction 2
Ns2 introduction 2Ns2 introduction 2
Ns2 introduction 2
 
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate028c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
 
Netcat
NetcatNetcat
Netcat
 
5 - Networking in Red Hat
5 - Networking in Red Hat5 - Networking in Red Hat
5 - Networking in Red Hat
 
Ccna Imp Guide
Ccna Imp GuideCcna Imp Guide
Ccna Imp Guide
 
DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1
DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1
DEF CON 27 - workshop - HUGO TROVAO and RUSHIKESH NADEDKAR - scapy dojo v1
 
Ciso 4 ospf
Ciso 4 ospfCiso 4 ospf
Ciso 4 ospf
 
Linux networking
Linux networkingLinux networking
Linux networking
 
Cisco asa firewall command line technical guide
Cisco asa firewall command line technical guideCisco asa firewall command line technical guide
Cisco asa firewall command line technical guide
 
Tcpdump
TcpdumpTcpdump
Tcpdump
 

Recently uploaded

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Basic linux commands

  • 1. Computer Networks (CS C461 / IS C461) Assignments PART A 1)ip: Name: show / manipulate routing, devices, policy routing and tunnels . Synopsis: ip [ OPTIONS ] OBJECT { COMMAND | help } OBJECT := { link | addr | addrlabel | route | rule | neigh | tunnel | maddr | mroute | monitor } OPTIONS := { -V[ersion] | -s[tatistics] | -r[esolve] | -f[amily] { inet | inet6 | ipx | dnet | link } | -o[neline] } Examples:  ip link show : List network interfaces  ip link set dev eth0 name eth1 : Rename interface eth0 to eth1
  • 2. Computer Networks (CS C461 / IS C461) Assignments PART A  ip link set dev eth0 up :Bring interface eth0 up (or down)  ip addr show : List addresses for interfaces  ip route show :List routing table  ip route add default via 10.3.10.1: Set default gateway to 10.3.10.1 2)nc: NAME: nc — arbitrary TCP and UDP connections and listens. SYNOPSIS: nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [hostname] [port[s]] DESCRIPTION: The nc (or netcat) utility is used for just about anything under the sun involving TCP or UDP. It can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6. Unlike telnet(1), nc scripts nicely, and separates error messages onto standard error instead of sending them to standard output, as telnet(1) does with some.
  • 3. Computer Networks (CS C461 / IS C461) Assignments PART A Examples:  nc host port: where host is the IP address or DNS name of a host to connect to and port is the TCP port number to connect to. By default, netcat uses TCP. Unlike telnet, netcat doesn't print anything to the screen when a connection is made unless you use the -v command line option.  To scan ports command used is : nc -z 10.3.10.36 10-100 and to show close ports too include –v: nc -vz 10.3.10.36 10-100 3)ssh: NAME: ssh — OpenSSH SSH client (remote login program). SYNOPSIS: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command]
  • 4. Computer Networks (CS C461 / IS C461) Assignments PART A DESCRIPTION: ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP ports can also be forwarded over the secure channel. Examples:  ssh user@hostname 4)scp: NAME: scp — secure copy (remote file copy program). SYNOPSIS: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file
  • 5. Computer Networks (CS C461 / IS C461) Assignments PART A DESCRIPTION: scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication. File names may contain a user and host specification to indicate that the file is to be copied to/from that host. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ‘:’ as host specifiers. Copies between two remote hosts are also permitted. Examples:  scp sampletextfile.txt your_username@remotehost.edu:/some/remote/directory  scp your_username@remotehost.edu:samplefile.txt /some/local/directory
  • 6. Computer Networks (CS C461 / IS C461) Assignments PART A 5)arp: NAME: arp - manipulate the system ARP cache. SYNOPSIS: arp [-vn] [-H type] [-i if] [-a] [hostname] arp [-v] [-i if] -d hostname [pub] arp [-v] [-H type] [-i if] -s hostname hw_addr [temp] arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub arp [-v] [-H type] [-i if] -Ds hostname ifname [netmask nm] pub arp [-vnD] [-H type] [-i if] -f [filename] DESCRIPTION: Arp manipulates or displays the kernel's IPv4 network neighbour cache. It can add entries to the table, delete one or display the current con‐ tent. ARP stands for Address Resolution Protocol, which is used to find the media access control address of a network neighbour for a given IPv4 Address. Examples:  arp -a  arp –a ip
  • 7. Computer Networks (CS C461 / IS C461) Assignments PART A  Delete an ARP entry: arp -d 6)rarp: NAME: rarp - manipulate the system RARP table SYNOPSIS: rarp [-V] [--version] [-h] [--help] rarp -a rarp [-v] -d hostname ... rarp [-v] [-t type] -s hostname hw_addr DESCRIPTION: Arp manipulates or displays the kernel's IPv4 network neighbour cache. It can add entries to the table, delete one or display the current con‐ tent. ARP stands for Address Resolution Protocol, which is used to find the media access control address of a network neighbour for a given IPv4 Address. Examples:  rarp –a aniket@ubuntu:~$ rarp -a This kernel does not support RARP.
  • 8. Computer Networks (CS C461 / IS C461) Assignments PART A 7)route: NAME: route - show / manipulate the IP routing table. SYNOPSIS: route [-CFvnee] route [-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw] [metric N] [mss M] [window W] [irtt I] [reject] [mod] [dyn] [reinstate] [[dev] If] route [-v] [-A family] del [-net|-host] target [gw Gw] [netmask Nm] [metric N] [[dev] If] route [-V] [--version] [-h] [--help] DESCRIPTION: Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured with the ifconfig(8) program. When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing tables. Examples:  route
  • 9. Computer Networks (CS C461 / IS C461) Assignments PART A  route add default gw 10.3.10.1 eth0 8)netstat: NAME: netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. SYNOPSIS: netstat [address_family_options] [--tcp|-t] [--udp|-u] [--raw|-w] [--listening|-l] [--all|-a] [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [--symbolic|-N] [--extend|-e[--extend|-e]] [--timers|-o] [--program|-p] [-- verbose|-v] [--continuous|-c] netstat {--route|-r} [address_family_options] [--extend|-e[--extend|-e]] [--verbose|-v] [-- numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [--continuous|-c] netstat {--interfaces|-i} [--all|-a] [--extend|-e[--extend|-e]] [--verbose|-v] [--program|-p] [-- numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric- users] [--continuous|-c] netstat {--groups|-g} [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [-- continuous|-c] netstat {--masquerade|-M} [--extend|-e] [--numeric|-n] [--numeric-hosts] [--numeric-ports] [-- numeric-users] [--continuous|-c] netstat {--statistics|-s} [--tcp|-t] [--udp|-u] [--raw|-w] netstat {--version|-V} netstat {--help|-h}
  • 10. Computer Networks (CS C461 / IS C461) Assignments PART A DESCRIPTION: Netstat prints information about the Linux networking subsystem. Examples:  List All Ports (both listening and non listening ports : netstat -a (-u if for udp ports)  show statistics for all ports using netstat –s
  • 11. Computer Networks (CS C461 / IS C461) Assignments PART A  Display the kernel routing information using netstat –r  Show the list of network interfaces: netstat -i 9)ifup: NAME: ifup - bring a network interface up. SYNOPSIS: ifup [-nv] [--no-act] [--verbose] [-i FILE|--interfaces=FILE] [--allow CLASS] -a|IFACE... ifup -h|--help ifup -V|--version DESCRIPTION: The ifup and ifdown commands may be used to configure (or, respec‐ tively, deconfigure) network interfaces based on interface definitions in the file /etc/network/interfaces.
  • 12. Computer Networks (CS C461 / IS C461) Assignments PART A 10)ifdown: NAME: take a network interface down SYNOPSIS: ifdown [-nv] [--no-act] [--verbose] [-i FILE|--interfaces=FILE] [--allow CLASS] -a|IFACE... DESCRIPTION: The ifup and ifdown commands may be used to configure (or, respec‐ tively, deconfigure) network interfaces based on interface definitions in the file /etc/network/interfaces. Examples(ifup and ifdown examples are provided together):  sudo ifup lo/ sudo ifdown lo 11)iwconfig: NAME: iwconfig - configure a wireless network SYNOPSIS: iwconfig [interface] iwconfig interface [essid X] [nwid N] [mode M] [freq F] [channel C][sens S ][ap A ][nick NN ] [rate R] [rts RT] [frag FT] [txpower T] [enc E] [key K] [power P] [retry R] [modu M] [commit] iwconfig --help iwconfig –version
  • 13. Computer Networks (CS C461 / IS C461) Assignments PART A DESCRIPTION: Iwconfig is similar to ifconfig(8), but is dedicated to the wireless interfaces. It is used to set the parameters of the network interface which are specific to the wireless operation (for example : the fre‐ quency). Iwconfig may also be used to display those parameters, and the wireless statistics (extracted from /proc/net/wireless). All these parameters and statistics are device dependent. Each driver will provide only some of them depending on hardware support, and the range of values may change Examples:  iwconfig(output is given for both with and without wireless connections)
  • 14. Computer Networks (CS C461 / IS C461) Assignments PART A 12)iwspy: NAME: iwspy - Get wireless statistics from specific nodes. SYNOPSIS: iwspy [interface] iwspy interface [+] DNSNAME | IPADDR | HWADDR [...] iwspy interface off iwspy interface setthr low high iwspy interface getthr DESCRIPTION: Iwspy is used to set a list of addresses to monitor in a wireless net‐ work interface and to read back quality of link information for each of those. This information is the same as the one available in /proc/net/wireless : quality of the link, signal strength and noise level. This information is updated each time a new packet is received, so each address of the list adds some overhead in the driver. Note that this functionality works only for nodes part of the current wireless cell, you can not monitor Access Points you are not associated with (you can use Scanning for that) and nodes in other cells. In Man‐ aged mode, in most case packets are relayed by the Access Point, in this case you will get the signal strength of the Access Point. For those reasons this functionality is mostly useful in Ad-Hoc and Master mode. Examples:  sudo iwspy eth0 Output: aniket@ubuntu:~$ sudo iwspy eth0 eth0 Interface doesn't support wireless statistic collection
  • 15. Computer Networks (CS C461 / IS C461) Assignments PART A 13)iwlist: NAME: iwlist - Get more detailed wireless information from a wireless inter‐ Face. SYNOPSIS: iwlist [interface] scanning iwlist [interface] frequency iwlist [interface] rate iwlist [interface] keys iwlist [interface] power iwlist [interface] txpower iwlist [interface] retry iwlist [interface] event iwlist [interface] auth iwlist [interface] wpakeys iwlist [interface] genie iwlist [interface] modulation iwlist --help iwlist –version DESCRIPTION: Iwlist is used to display some additional information from a wireless network interface that is not displayed by iwconfig(8). The main argu‐ ment is used to select a category of information, iwlist displays in detailed form all information related to this category, including information already shown by iwconfig(8).
  • 16. Computer Networks (CS C461 / IS C461) Assignments PART A Examples:  iwlist wlan0 scan 14)tracepath: NAME: tracepath, tracepath6 - traces path to a network host discovering MTU along this path. SYNOPSIS: tracepath [-n] [-b] [-l pktlen] destination [port] DESCRIPTION: It traces path to destination discovering MTU along this path. It uses UDP port port or some random port. It is similar to traceroute, only does not require superuser privileges and has no fancy options. tracepath6 is good replacement for traceroute6 and classic example of application of Linux error queues. The situation with IPv4 is worse, because commercial IP routers do not return enough information in icmp error messages. Probably, it will change, when they will be updated. For now it uses Van Jacobson's trick, sweeping a range of UDP ports to maintain trace history.
  • 17. Computer Networks (CS C461 / IS C461) Assignments PART A Examples:  tracepath localhost  tracepath -b localhost(-b resolves ip address)  tracepath from localhost(of bits mail server)
  • 18. Computer Networks (CS C461 / IS C461) Assignments PART A 15)dhclient: NAME: dhclient - Dynamic Host Configuration Protocol Client. SYNOPSIS: dhclient [ -p port ] [ -d ] [ -e VAR=value ] [ -q ] [ -1 ] [ -r ] [ -x ] [ -lf lease-file ] [ -pf pid-file ] [ -cf config-file ] [ -sf script-file ] [ -s server ] [ -g relay ] [ -n ] [ -nw ] [ -w ] [ if0 [ ...ifN ] ] DESCRIPTION: The Internet Systems Consortium DHCP Client, dhclient, provides a means for configuring one or more network interfaces using the Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols fail, by statically assigning an address. Examples:  sudo dhclient eth0