arp command in Linux with examples Last Updated : 24 Nov, 2022 Comments Improve Suggest changes Like Article Like Report arp command manipulates the System's ARP cache. It also allows a complete dump of the ARP cache. ARP stands for Address Resolution Protocol. The primary function of this protocol is to resolve the IP address of a system to its mac address, and hence it works between level 2(Data link layer) and level 3(Network layer). Syntax: arp [-v] [-i if] [-H type] -a [hostname] Example: Here we created two machines with name machine1 and machine2 with IP address 10.0.2.4 and 10.0.2.5 Screenshot of hosts before adding Addition of host Hosts file after adding machines Now checking arp for all Options: -v, --verbose: This option shows the verbose information.-n, --numeric: This option shows numerical addresses instead of symbolic host, port or usernames. -H type, --hw-type type, -t type: This tells arp which class of entries it should check for. Default value is ether. List of possible hardware types(which support ARP) are ash(Ash), ether(Ethernet), ax25(AMPR AX.25), netrom (AMPR NET/ROM), rose (AMPR ROSE), arcnet (ARCnet), dlci (Frame Relay DLCI), fddi (Fiber Distributed Data Interface), hippi (HIPPI), irda (IrLAP), x25 (generic X.25), eui64 (Generic EUI-64). -a [hostname] --all: This option is used for showing entries of the specified host. If nothing is passed all entries will be displayed. -d hostname, --delete hostname: Removes any entry for the specified host. If any host is down, there is no need of keeping its entry in arp cache so this command is used to delete those entries explicitly by the user. -D, --use-device: Use the given interface's hardware address. -e: Shows the entries in default(Linux) Style.-i If, --device If: Select an interface. When dumping the ARP cache, only entries matching the specified interface will be printed. Note: This has to be different from the interface to which the IP datagrams will be routed.-s hostname hw_address: Manually create an ARP address mapping entry for the host hostname with its mac address as hw_address. -f filename: Works same as -s but instead of giving the entries manually, it takes entry from the file given as parameter. Some useful flags are: -C: Complete entry.-M: Permanent entry.-P: Published entry. Some useful file related to these data are: /proc/net/arp/etc/networks/etc/hosts//etc/ethers Comment More infoAdvertise with us sshubhamk1 Follow Improve Article Tags : Linux-Unix Similar Reads acpid command in Linux with Examples The acpid daemon provides intelligent power management on a system and allows to query battery and configuration status by supporting the Advanced Configuration and Power Interface (ACPI). The ACPI events are notified to the user-space programs by acpid. The ACPI (Advanced Configuration and Power In 3 min read addr2line command in Linux with Examples 'addr2line' command in Linux is used to convert addresses into file names and line numbers. When the executable files/object files are run with the 'objdump' command, the file is de-assembled and the machine code is displayed. These machine instructions for the executable are displayed along with th 4 min read agetty command in Linux with Examples agetty is a Linux version of getty. getty short for "get tty" is a Unix program running on a host computer that manages physical or virtual terminals to allow multi-user access. Linux provides a virtual terminal(tty) which is similar to the regular Linux terminal. agetty command opens a virtual term 4 min read How to Create and Use Alias Command in Linux Imagine you're lost in a maze of complicated Linux commands. You stumble upon a secret doorway marked "Alias," and inside you find shortcuts to all your favorite commands! That's what creating aliases is like. You get to make your own mini-commands for the long ones you use all the time, making thin 6 min read amixer command in Linux with Examples amixer is a command-line mixer for ALSA(Advanced Linux Sound Architecture) sound-card driver . amixer can support multiple soundcards. amixer with no arguments will display the current mixer settings for the default soundcard as well as the device. This is a good way to see a list of the simple mixe 2 min read aplay command in Linux with examples aplay is a command-line audio player for ALSA(Advanced Linux Sound Architecture) sound card drivers. It supports several file formats and multiple soundcards with multiple devices. It is basically used to play audio on command-line interface. aplay is much the same as arecord only it plays instead o 2 min read aplaymidi Command in Linux with Examples aplaymidi command in Linux is used to play standard MIDI(Musical Instrument Digital Interface) files, by sending the content of a MIDI file to an ALSA(Advanced Linux Sound Architecture) MIDI port, sound renderer like timidity or a hardware MIDI device is required to play MIDI files. Syntaxaplaymidi 3 min read apropos command in Linux with Examples Linux/Unix comes with a huge number of commands and thus it become quite difficult sometimes to remember each and every command. apropos command becomes useful in such cases. apropos command helps the user when they don't remember the exact command but knows a few keywords related to the command tha 3 min read apt command in linux with examples apt provides a high-level Command Line Interface (CLI) for the APT package management system, offering a user-friendly interface intended for interactive use. It simplifies common tasks like installation, upgrades, and removal, with better defaults than more specialized tools like apt-get and apt-ca 5 min read apt-get command in Linux with Examples The command-line tool `apt-get` is the most popular package management tool used in our Debian-based Linux operating system. This article provides an overview of `apt-get` and its basic syntax. It will include the most commonly used commands, their syntax, description, and examples. It also gives an 15+ min read Like