Các lệnh mạng cơ bản trong Linux bạn cần biết

TricksMMO

Administrator
Staff member
Chuyển ** Các lệnh chuyển tệp và mạng Linux **

**Mục lục**

* [Các lệnh mạng cơ bản trong Linux] (#-Network-Commands-In-Linux)
* [Lệnh ping] (#ping-command)
* [DIG lệnh] (#lệnh-DIG)
* [Lệnh Whois] (#Whois-Command)
* [Lệnh Hostame] (#HOSTNAME-CIMMAND)
* [Lệnh IP A] (#IP-Command-A)
* [Lệnh ngón tay] (#chỉ huy ngón tay)
* [Lệnh Netstat -a] (#NetStat --- A-Command)
* [Lệnh traceroute] (#lệnh-traceroute)
* [Các lệnh truyền tệp cơ bản trong Linux] (#Cơ bản-Transmission-Commands-In-Linux)
* [Lệnh FTP] (#FTP-Command)
* [Lệnh SFTP] (#SFTP-Command)
* [Lệnh SCP] (#SCP-Command)
* [Lệnh RSYNC] (#RSYNC-Command)
* [Lệnh ssh] (#Command-ssh)

## Các lệnh mạng cơ bản trong Linux

Lệnh ### ping

Lệnh `ping` được sử dụng để kiểm tra kết nối mạng giữa hai máy tính và xem máy chủ có thể truy cập được không.

** Lệnh ping hoạt động như thế nào? **

Lệnh `ping` sử dụng một thứ gọi là ICMP, viết tắt của giao thức thông báo kiểm soát Internet.Nó gửi một yêu cầu Echo ICMP đến địa chỉ IP bạn cung cấp.Nếu kết nối thành công, nó sẽ phản hồi với câu trả lời Echo ICMP.Bạn sẽ biết máy chủ có thể truy cập nếu bạn nhận được phản hồi từ ICMP.

### DIG lệnh

Lệnh `Dig` có thể được sử dụng để xem thông tin DNS của một trang web.Nó là viết tắt của "Groper thông tin miền".Bên cạnh tên máy chủ, bạn cũng có thể xem thông tin về địa chỉ của máy chủ, lưu trữ và trao đổi thư.Mặc dù bất cứ ai cũng có thể sử dụng lệnh này, nhưng nó chủ yếu được sử dụng bởi các quản trị viên hệ thống (sysadmins).

### Lệnh WHOIS

Lệnh `whois` là một lệnh cơ bản khác được sử dụng để tra cứu thông tin.Trong trường hợp này, sử dụng WHOIS sẽ cung cấp cho bạn chi tiết về tên miền, chẳng hạn như thông tin chủ sở hữu.

Lệnh ### Hostame

Như tên lệnh gợi ý, lệnh này cho bạn biết tên máy chủ.

### lệnh ip a

Lệnh `ip a` được sử dụng để tìm địa chỉ IP của nó.Tất nhiên, biết địa chỉ IP của bạn là rất quan trọng.Bạn có thể đọc bài viết này để biết tin tặc có thể làm gì nếu họ biết địa chỉ IP của bạn.

Bạn cũng có thể sử dụng lệnh IP để xem một số thông tin khác.Ví dụ: `IP Link` sẽ hiển thị thông tin của lớp liên kết.

### Lệnh ngón tay

Lệnh `Finger` cho bạn thấy thông tin chi tiết của tất cả người dùng đã đăng nhập. Đây là một lệnh tuyệt vời cho sysadmins vì họ có thể xem những thứ như thời gian đăng nhập chính xác và thậm chí cả email của người dùng.Để sử dụng lệnh này, bạn có thể cần cài đặt nó bằng lệnh `sudo apt-get install finger`.

### netstat -a lệnh

Một lệnh hữu ích khác là `netstat`.Trong trường hợp này, tôi đang sử dụng `netstat -a` để liệt kê tất cả các cổng nghe.

Cổng nghe là khi thiết bị của bạn đã sẵn sàng chấp nhận kết nối trên cổng đó.Bạn có thể đóng và mở các cổng bất cứ lúc nào.

### Lệnh Traceroute

Lệnh `Traceroute` hiển thị tuyến đường mà một gói đã thực hiện để tiếp cận máy chủ.Nếu bạn nhìn vào hình ảnh bên dưới, bạn có thể tìm thấy bao nhiêu `hops` (HPS) cần thiết để tiếp cận máy chủ bạn muốn.Một hop xảy ra khi một gói được chuyển từ một phần cứng mạng sang phần cứng mạng tiếp theo.

## Các lệnh truyền tệp cơ bản trong Linux

Đây là những lệnh cơ bản nhất cho người mới bắt đầu.Ngoài ra, có nhiều lệnh khác mà bạn có thể tìm hiểu thêm về.

Lệnh ### FTP

`Ftp` là viết tắt của` Giao thức truyền tệp`.Bạn có thể sử dụng lệnh này, nhưng đây là một cách không an toàn để chuyển các tệp vì khi bạn nhập tên người dùng và mật khẩu của mình, nó sẽ di chuyển trực tuyến dưới dạng văn bản thuần túy.

Lệnh ### SFTP

`SFTP` là viết tắt của` Giao thức truyền tệp an toàn`.Đây là một an toàn
=======================================
Transfer **Linux Network and File Transfer Commands**

**Table of Contents**

* [Basic Network Commands in Linux](#basic-network-commands-in-linux)
* [Ping Command](#ping-command)
* [Command DIG](#command-dig)
* [WHOIS Command](#whois-command)
* [Hostame Command](#hostname-command)
* [IP Command a](#ip-command-a)
* [Finger Command](#finger-command)
* [Netstat -A Command](#netstat---a-command)
* [Command traceroute](#command-traceroute)
* [Basic File Transmission Commands in Linux](#basic-file-transmission-commands-in-linux)
* [FTP Command](#ftp-command)
* [SFTP Command](#sftp-command)
* [SCP Command](#scp-command)
* [RSync Command](#rsync-command)
* [Command ssh](#command-ssh)

## Basic Network Commands in Linux

### Ping Command

The `ping` command is used to check the network connection between two computers and see if the server is accessible.

**How does the Ping command work?**

The `ping` command uses something called ICMP, which stands for Internet Control Message Protocol. It sends an ICMP echo request to the IP address you provide. If the connection is successful, it will respond with an ICMP echo reply. You will know the server is accessible if you get a response from ICMP.

### Command DIG

The `dig` command can be used to view the DNS information of a website. It stands for "Domain Information Groper". Besides the server name, you can also view information about the address of the server, storage, and mail exchange. Although anyone can use this command, it is mainly used by system administrators (Sysadmins).

### WHOIS Command

The `whois` command is another basic command used to look up information. In this case, using WHOIS will provide you with details about the domain, such as the owner information.

### Hostame Command

As the command name suggests, this command tells you the hostname.

### IP Command a

The `ip a` command is used to find its IP address. Of course, knowing your IP address is very important. You can read this article to know what hackers can do if they know your IP address.

You can also use the IP command to see some other information. For example, `ip link` will display the information of the link class.

### Finger Command

The `finger` command shows you the detailed information of all users who have logged in. This is a great command for Sysadmins as they can view things like the accurate login time and even the user's email. To use this command, you may need to install it with the `sudo apt-get install finger` command.

### Netstat -A Command

Another useful command is `netstat`. In this case, I am using `netstat -a` to list all the listening ports.

The listening port is when your device is ready to accept the connection on that port. You can close and open ports at any time.

### Command traceroute

The `traceroute` command shows the route that a packet has taken to reach the server. If you look at the image below, you can find how many `hops` (HPs) it took to reach the server you want. A hop occurs when a packet is transferred from one network hardware to the next network hardware.

## Basic File Transmission Commands in Linux

These are the most basic commands for beginners. In addition, there are many other commands that you can find out more about.

### FTP Command

`FTP` stands for `file transfer protocol`. You can use this command, but this is an unsafe way to transfer files because when you enter your username and password, it will move online in the form of pure text.

### SFTP Command

`SFTP` stands for `secure file transfer protocol`. This is a safe
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top