Introduction to Linux shell commands

Source: Internet
Author: User
Tags linux shell commands

In this article I introduce a few very useful and network-related commands

I. Ifconfig

This command is "translated to ipconfig" under windows and is used to display details such as network interfaces, subnet masks, and so on.

Note: In each system, the default is Lo, which is called the loopback interface, and this interface points to the current host itself.

Ifconfig the left column is the network interface name, which occupies 10 bytes, and several columns on the right display the details of the corresponding network interface.

The screenshot below is the information displayed after running this command on the blogger's computer:

Related skills

1. Print Network interface list

Ifconfig | Cut-c-10 | Tr-d ' | Tr-s ' \ n '

Description: The first 10 bytes of the ifconfig output display the network interface name, so we use the Cut command to extract the first 10 characters of each row.

The screenshot of the run is shown below:

This article URL address:

2. Hardware address (MAC address) spoofing

In some cases, it is necessary to use the hardware address to authenticate or filter computers on the network, in which case we can use the hardware address spoofing

The order is as follows:

ifconfig eth0 hw ether 00:1c:bf:87:25:d5

Let's run the next look at the results:

Note: This command needs to use root permissions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.