前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >10 Essential Terminal Commands Every Developer Should Know

10 Essential Terminal Commands Every Developer Should Know

作者头像
IT小马哥
发布于 2025-01-08 01:20:20
发布于 2025-01-08 01:20:20
8302
代码可运行
举报
文章被收录于专栏:Java TaleJava Tale
运行总次数:2
代码可运行

List of useful Unix terminal commands to boost your productivity. Here are some of my favorites. Sometimes, tasks that might take hours to code can be accomplished in minutes with the terminal. This article assumes you’re already comfortable with basic commands like rm, pwd, and cd.

grep

Need to find where a function or variable is used in your codebase, or sift through logs to locate specific entries? grep can help you with that.

The grep command searches for specific patterns in files. It’s like having a supercharged search function that digs into file contents.

The basic syntax for the grep command goes as the following;

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ grep "let's find something" file.[txt,json,js,md,etc]

Case-insensitive search: Add the -i flag to ignore case differences.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ grep -i "REact" compiler/apps/playground/app/index.tsx
? '[DEV] React Compiler Playground'
: 'React Compiler Playground'

Count occurrences: Use the -c flag to count the number of matching lines.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ grep -c "React" compiler/apps/playground/app/index.tsx

Analyzing logs: If you’re troubleshooting an issue, you can use grep to find specific error messages in logs.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ grep -i "Operation not supported on socket" system.log
09/24 08:51:01 INFO   :..settcpimage: Get TCP images rc - EDC8112I Operation not supported on socket.

Search for Multiple Patterns: You can search for multiple patterns by using the -e flag multiple times.

Match either “error” or “404” in system.log.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ grep -e "error" -e "404" system.log
npm error code E404
npm error 404  'trevorlasn.com@*' is not in this registry.
npm error A complete log of this run can be found in: /Users/trevorindreklasn/.npm/_logs/2024-08-20T16_41_32_846Z-debug-0.log

Recursive Search: To search for a pattern in all files within a directory and its subdirectories, use the -r (or —recursive) flag.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ grep -o -r "fs" node_modules | wc -l
22491

This will search through all files in the specified directory and its subdirectories. The -o option tells grep to print only the matched parts of the line.

The pipe | takes the output from the command on the left (grep) and uses it as input for the command on the right (wc -l). wc -l counts and displays the number of lines in its input.

man

The man command stands for “manual.” It helps you find detailed information about other commands and programs.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ man grep

NAME
     grep, egrep, fgrep, rgrep, bzgrep, bzegrep, bzfgrep, zgrep,
     zegrep, zfgrep – file pattern searcher

SYNOPSIS
     grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num]
          [-C num] [-e pattern] [-f file] [--binary-files=value]
          [--color[=when]] [--colour[=when]] [--context=num]
          [--label] [--line-buffered] [--null] [pattern] [file ...]

DESCRIPTION
     The grep utility searches any given input files, selecting
     lines that match one or more patterns.  By default, a pattern
     matches an input line if the regular expression (RE) in the
     pattern matches the input line without its trailing newline.
     An empty expression matches every line.  Each input line that
     matches at least one of the patterns is written to the standard
     output.

     grep is used for simple patterns and basic regular expressions
     (BREs); egrep can handle extended regular expressions (EREs).
     See re_format(7) for more information on regular expressions.
     fgrep is quicker than both grep and egrep, but can only handle
     fixed patterns (i.e., it does not interpret regular
     expressions).  Patterns may consist of one or more lines,
     allowing any of the pattern lines to match a portion of the
     input.

     zgrep, zegrep, and zfgrep act like grep, egrep, and fgrep,
     respectively, but accept input files compressed with the
     compress(1) or gzip(1) compression utilities.  bzgrep, bzegrep,
     and bzfgrep act like grep, egrep, and fgrep, respectively, but
     accept input files compressed with the bzip2(1) compression
     utility.

     The following options are available:

     -A num, --after-context=num
             Print num lines of trailing context after each match.
             See also the -B and -C options.
             ...

cat

The cat command is short for “concatenate.” It’s used to display the contents of a file, combine files, or create new ones.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜  trevorlasn.com git:(master) ✗ cat astro.config.mjs
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import vercel from "@astrojs/vercel/static";
import partytown from "@astrojs/partytown";

// https://astro.build/config
export default defineConfig({
  site: "https://www.trevorlasn.com",
  integrations: [ mdx(), sitemap(), tailwind(), partytown({
    config: {
      forward: ["dataLayer.push"]
    }
  }), ],
  output: "static",
  adapter: vercel(),
});

Combining Files: One of the key features of cat is its ability to combine multiple files into one. For instance, if you want to merge file1.txt and file2.txt into file3.txt, you can do this:

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ cat file1.txt file2.txt > file3.txt

This command above takes the content of file1.txt and file2.txt and merges them into file3.txt. The > operator is used to direct the combined output into a new file.

Creating New Files: You can also use cat to create new files. Type your text, and when you’re done, press Ctrl+D to save and exit.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ cat > newfile.txt
hey
➜ ls
newfile.txt
➜ cat newfile.txt
hey

cat is helpful for viewing smaller files, but for very large files, it can be overwhelming as it dumps everything at once. In such cases, it’s better to use commands like less or head to view files in a more controlled way.

head

You often don’t need to see all the content when working with large files. Instead of using cat to display everything, the head command lets you preview just the first few lines of a file.

This is especially useful for checking the structure of CSV files, logs, or any other large text files.

By default, head shows the first 10 lines of a file:

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜  trevorlasn.com git:(master) ✗ head package-lock.json
{
  "name": "trevorlasn.com",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "trevorlasn.com",
      "version": "1.0.0",
      "dependencies": {

If you need more or fewer lines, you can specify the exact number using the -n option:

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜  trevorlasn.com git:(master) ✗ head -n 5 package-lock.json
{
  "name": "trevorlasn.com",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,

Previewing CSV Headers: For CSV files, head is perfect for quickly checking the header or structure:

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ head -n 1 username-password-recovery-code.csv
Username; Identifier;One-time password;Recovery code;First name;Last name;Department;Location

awk

awk is a powerful tool for pattern scanning and processing. It’s particularly useful for manipulating and analyzing text files and data streams.

With awk, you can filter, extract, and transform data in a file or from command output.

awk efficiently extracts and combines data from various sources using its associative arrays. Suppose you have two CSV files:

List of employees.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ cat employees.csv
ID,Name,Department
101,John Doe,Sales
102,Jane Smith,Engineering
103,Jim Brown,Sales

List of salaries.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ cat salaries.csv
ID,Salary
101,50000
102,60000
103,55000

Use awk to merge these files and display each employee’s name with their salary.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ awk -F',' '
    NR==FNR {salaries[$1]=$2; next}
    FNR==1 {next}
    {print $2, salaries[$1]}
' salaries.csv employees.csv
John Doe 50000
Jane Smith 60000
Jim Brown 55000
  • NR==FNR {salaries[1]=2; next}: While processing the first file (salaries.csv), store salaries in an associative array. The employee ID (1) is the key, and the salary (2) is the value. This runs only for the first file.
  • FNR==1 {next}: Skip the header line of the second file (employees.csv).
  • {print 2, salaries[1]}: For each line in the second file (employees.csv), print the employee’s name (2) and their salary from the array (salaries[1]).

You can also save the results to a new file.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ awk -F',' '
    NR==FNR {salaries[$1]=$2; next}
    FNR==1 {next}
    {print $2, salaries[$1]}
' salaries.csv employees.csv > combined.csv

➜ cat combined.csv
John Doe 50000
Jane Smith 60000
Jim Brown 55000

sed

sed, short for Stream Editor, is a powerful tool for text processing in the terminal. It allows you to find, replace, insert, or delete text within files or streams of data.

You can use it for quick edits without opening a text editor, making it great for scripting and automation.

Replace a word or pattern in a file: Replacing “Trevor” with “John”.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ cat hello.md
My name is Trevor
➜ sed -i '' 's/Trevor/John/' hello.md
➜ cat hello.md
My name is John

If you want save the changes, use the -i option.

Print Specific Lines: Print only specific lines from a file.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜  trevorlasn.com git:(master) ✗ sed -n '2,4p' package-lock.json
  "name": "trevorlasn.com",
  "version": "1.0.0",
  "lockfileVersion": 3,

This prints lines 2 through 4.

Regular Expressions: sed supports regular expressions, allowing for complex search-and-replace operations. For example, replace all digits with “X”:

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ cat combined.csv
John Doe 50000
Jane Smith 60000
Jim Brown 55000
➜ sed 's/[0-9]/X/g' combined.csv
John Doe XXXXX
Jane Smith XXXXX
Jim Brown XXXXX

Renaming Files in Bulk: Let’s say you have multiple files with the extension .txt and you want to rename them to .md.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ ls
1.txt 2.txt 3.txt
➜ for file in *.txt; do
    mv "$file" "$(echo "$file" | sed 's/.txt$/.md/')"
  done
➜ ls
1.md 2.md 3.md

sed is highly versatile, and these examples just scratch the surface

tail

tail is the counterpart to head. It allows you to view the last few lines of a file rather than the first. It’s commonly used to monitor log files or check the end of a document. By default, tail shows the last 10 lines of a file.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜  trevorlasn.com git:(master) ✗ tail package.json
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^7.3.1",
    "@typescript-eslint/parser": "^7.3.1",
    "eslint": "^8.57.0",
    "eslint-plugin-astro": "^0.32.0",
    "eslint-plugin-jsx-a11y": "^6.8.0",
    "typescript": "^5.4.2"
  }
}

Viewing More or Fewer Lines: You can adjust the number of lines shown using the -n option.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜  trevorlasn.com git:(master) ✗ tail -n 15 package.json
    "astro": "^4.13.3",
    "clsx": "^2.1.0",
    "sharp": "^0.33.3",
    "tailwind-merge": "^2.2.2",
    "tailwindcss": "^3.4.1"
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^7.3.1",
    "@typescript-eslint/parser": "^7.3.1",
    "eslint": "^8.57.0",
    "eslint-plugin-astro": "^0.32.0",
    "eslint-plugin-jsx-a11y": "^6.8.0",
    "typescript": "^5.4.2"
  }
}

Real-Time File Monitoring: One of the most powerful features of tail is the -f option, which allows you to follow a file as it grows. This is especially useful for watching log files in real-time.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ tail -f 1.md
11
Changing file

As new lines are added to 1.md, tail will automatically display them.

chmod

Each file has three sets of permissions: owner, group, and others. These are typically represented in a format like rwxr-xr—

  • r: Read permission
  • w: Write permission
  • x: Execute permission

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ ls -l sensitive.md
-rw-r--r--@ 1 trevorindreklasn  staff  0 Aug 21 15:22 sensitive.md

The file permissions -rw-r—r— indicate that:

  • Owner (trevorindreklasn): Has read (r) and write (w) permissions.
  • Group (staff): Has read (r) permissions.
  • Others: Have read (r) permissions.

The @ symbol indicates that the file has extended attributes, which are additional metadata beyond standard file permissions.

File permissions control who can read, write, or execute a file, ensuring security and proper access management by preventing unauthorized users from modifying or viewing sensitive data.

To restrict access to sensitive.md so that only the root user or superadmins can view and write to it, you can use the chmod command to modify the file’s permissions.

First, ensure the file is owned by the root user or a superadmin. You might need sudo for changing ownership:

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ ls -l sensitive.md
-rw-r--r--@ 1 root  staff  0 Aug 21 15:22 sensitive.md

➜ sudo chown root:admin sensitive.md
➜ ls -l sensitive.md
-rw-r-----@ 1 root  admin  0 Aug 21 15:22 sensitive.md

➜ sudo chmod 600 sensitive.md
➜  textfiles ls -l sensitive.md
-rw-------  1 root  admin  0 Aug 21 15:22 sensitive.md

Only the owner (root) has read and write access. While the group and others have no permissions. This restricts access to the file, making it readable and writable only by the owner.

Improper file permissions can lead to security issues or system problems

  • Unauthorized Access: File containing sensitive information, like passwords or financial data, has overly permissive settings (e.g., chmod 777), anyone on the system can read or modify it. This could lead to data breaches or unauthorized access to sensitive information.
  • Malware Installation: A file or directory with write permissions for all users (e.g., chmod 777) could be exploited by attackers to place malicious scripts or software, potentially compromising the entire system.
  • Data Corruption: If files that should be read-only (e.g., logs or system configurations) are accidentally given write permissions, users or applications might inadvertently corrupt or erase critical data, leading to system instability or loss of important information.

xargs

The xargs command builds and runs commands using input from other commands. It’s used to pass a list of items as arguments to another command.

Suppose you have a list of files that you want to delete.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ ls
1.txt        2.txt       2.md         3.md         sensitive.md

# Find all .txt files and delete them
➜ find . -name "*.txt" | xargs rm

➜  ls
2.md         3.md         sensitive.md

Instead of deleting them one by one, you can use xargs to pass the list of files to rm.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
find . -name "*.tmp" | xargs rm

Creating Multiple Directories: If you have a list of directory names in a file and want to create all of them, you can use xargs with mkdir.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ cat dirs.txt
src
temp
utils
public

➜ ls
2.md         3.md         dirs.txt     sensitive.md

# Creates each directory listed in the file.
➜ cat dirs.txt | xargs mkdir

➜ ls
2.md         dirs.txt     sensitive.md temp
3.md         public       src          utils

Compressing Files: If you have multiple files that you want to compress using gzip, you can use xargs to pass the filenames to gzip.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# Compresses all .log files in the current directory
ls *.log | xargs gzip

find

Search and locate files and directories within your file system based on various criteria. It’s highly customizable and can be combined with other commands for complex tasks.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
find [path] [expression]

The find command searches for occurrences of “astro” within the node_modules directory, returning paths to files and directories with that name, including executables and package files.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ trevorlasn.com git:(master) ✗ find node_modules -name "astro"

node_modules/.bin/astro

node_modules/astro

node_modules/astro/dist/runtime/server/render/astro

Cleanup old log files: Regularly delete log files older than a month to free up disk space.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜ find /var/log -type f -name "*.log" -mtime +30 -delete

Backup important files: Locate and copy all .docx files from home directory to a backup location.

Terminal window

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
➜  find ~/Documents -name "*.docx" -exec cp {} /path/to/backup/ \;

The find command is incredibly versatile and can be tailored to suit a wide range of file management tasks.

转自:https://www.trevorlasn.com/blog/10-essential-terminal-commands-every-developer-should-know

本文由 小马哥 创作,采用 知识共享署名4.0 国际许可协议进行许可 本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2025-01-07,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
华为ensp实验——DHCP
定义:DHCP动态主机配置协议是通过C/S框架构成,无需主机配置IP地址,动态分配IP地址,掩码,网关,DNS。
冷影玺
2023/10/12
1.1K0
华为ensp实验——DHCP
华为ensp实验——直连路由实验
冷影玺
2023/10/12
1.2K0
华为ensp实验——直连路由实验
DHCP中继(实验操作)
DHCP中继(实验操作) 实验拓扑: 实验配置: #DHCP服务器基础配置 sys sys AR1 int g0/0/0 ip add 192.168.12.1 24 ip route-static 192.168.10.0 24 192.168.12.2 ip route-static 192.168.20.0 24 192.168.12.2 #DHCP中继基础配置 sys sys SW1 vlan batch 10 20 int g0/0/1 p l a p d v 10 int g0/0/2
宝耶需努力
2022/12/13
4500
DHCP中继(实验操作)
企业网项目设计组网【文末送书】
随着网络的普及和internet的飞速发展,人们已经把更多的生活、娱乐和学习等事务转移到移动网络这个平台上去开展。企业通过internet开展远程视频会议、家人和朋友通过internet进行跨地域的沟通交流,学校开展网上课堂供学生随时随地开展学习,可以说现代社会中的人们几乎已经无法离开网络,无法离开internet。今天以一个公司的新建网络建设为案例,介绍中小型企业网项目建设的相关流程。
Ponnie
2021/08/25
2.5K0
企业网项目设计组网【文末送书】
双防火墙+双核心交换机,故障自动切换的配置方法
上一篇文章中,我们讲述了双防火墙的基础配置,也就是利用心跳线配置防火墙的HRP,发生故障的时候,自动切换。
IT狂人日志
2022/05/18
2.9K0
双防火墙+双核心交换机,故障自动切换的配置方法
Cisco-DHCP配置
网络已经成为了我们生活中不可或缺的一部分,它连接了世界各地的人们,让信息和资源得以自由流动。随着互联网的发展,我们可以通过网络学习、工作、娱乐,甚至是社交。因此,学习网络知识和技能已经成为了每个人都需要掌握的重要能力。
可惜已不在
2024/10/17
1820
Cisco-DHCP配置
linux下DHCP服务原理总结
DHCP(全称Dynamic host configuration protocol):动态主机配置协议 DHCP工作在OSI的应用层,可以帮助计算机从指定的DHCP服务器获取配置信息的协议。(主要包
洗尽了浮华
2018/01/23
7.3K0
linux下DHCP服务原理总结
网管最后的倔强——你要上网可以,但是走哪条链路由我说了算
作为一名合格的网管,除了修得了电脑,还要换得了灯泡;除了能折腾服务器,还得做好物业服务,要么擅长通下水道,要么会修中央空调。
IT狂人日志
2022/05/18
3320
网管最后的倔强——你要上网可以,但是走哪条链路由我说了算
CentOS 7下搭建DHCP中继服务详解
1、在GNS3中搭建DHCP中继服务的拓扑图,方便我们搭建服务的时候理清思路。在这里我使用一台win 10虚拟机、一台win 7虚拟机、一台CentOS 7虚拟机、两台c3725路由设备。首先添加两台路由设备,并在路由设备上添加磁盘空间方便我们创建vlan,添加2层交换接口,方便我们把路由设备做成一个3层交换设备与一个2层交换设备。添加三台host主机,分别更名为DHC、win 10、win 7,这个时候还需要我们在VMware 15虚拟机设备中添加两块虚拟网卡,设知道仅主机模式,这个时候在重新回到GNS3中使用链接线将设备接起来,这个实验中我们将划分3个vlan,分别将3台虚拟机划分到不同的vlan中(vlan地址划分:vlan10:192.168.10.1/24、vlan20:192.168.20.1/24、vlan100:192.168.100.1/24,给DHCP服务器指定静态IP地址 192.168.100.100。如下图所示:
星哥玩云
2022/07/28
1.3K0
CentOS 7下搭建DHCP中继服务详解
企业网络配置ensp模拟
1.将SW1-SW2间的e0/0/5、e0/0/6配置为手工方式的eth-trunk,链路编号为eth-trunk 12
网络工程师笔记
2024/05/23
4450
企业网络配置ensp模拟
【实验课堂】MSTP+VRRP综合实验
2、将交换机互联端口配置为Trunk并允许除了VLAN 1以外的其他VLAN通过。
Ponnie
2021/02/24
2.8K0
弄它!!!小小DHCP,连网管大哥都懂的协议,你还不会嘛?看这里,理论加实验分分钟拿下DHCP,带你走进网管的世界!
学习目标 看完本章博客你将能够: 理解DHCP的原理与配置 理解DHCP Relay的原理与配置 理解DHCP Relay的原理与配置
不吃小白菜
2020/09/03
1.3K0
弄它!!!小小DHCP,连网管大哥都懂的协议,你还不会嘛?看这里,理论加实验分分钟拿下DHCP,带你走进网管的世界!
华为超级vlan配置_华为p9参数配置
了解super VLAN之前,我们想想,如果没有super VLAN是什么样的情况?
全栈程序员站长
2022/10/02
7360
华为超级vlan配置_华为p9参数配置
弄它!!!小小VRRP!分分钟拿下!!理论加实验带你玩转VRRP与浮动路由!
看完本篇博客你会了解: VRRP的工作原理。 VRRP的基本配置。 VRRP的典型组网模型及并掌握配置方法。 VRRP的常见问题及解决办法。
不吃小白菜
2020/09/03
4.2K1
弄它!!!小小VRRP!分分钟拿下!!理论加实验带你玩转VRRP与浮动路由!
简单的NAT实验
最近有在学习华为安全,无奈R/S的基础太差了,但是还是要慢慢的补回来的。 这个实验简单的用到了vlan划分,ospf和源NAT和目的NAT技术,也只是很基础很基础的。
黑白天安全
2020/04/14
5200
简单的NAT实验
H3CNE实验(Vlan/Ftp/DHC
2、SW1的Ethernet1/0/1和 Ethernet1/0/5分别属于Vlan1 和Vlan2
py3study
2020/01/06
6200
H3CNE实验(Vlan/Ftp/DHC
一文总结日常网络维护及配置命令
[R2-Serial1/0/0]rip authentication-mode simple huawei //明文 [R2-Serial2/0/0]rip authentication-mode md5 usual huawei //MD5
Ponnie
2022/03/15
1.1K0
这个实验会做了,网络基础基本掌握一半了
实验案例:在华为ensp软件上模拟实验,对本阶段的知识进行汇总实验 实验环境 如图所示,在win10下使用华为ensp软件上进行模拟实验
不吃小白菜
2020/09/03
7740
这个实验会做了,网络基础基本掌握一半了
DHCP欺骗实验操作及防护措施
当交换机GE 0/0/1的端口与AR1的GE 0/0/0的合法端口通信中断后,Pc1和Pc2重新获取DHCP地址时,无法获取。如图所示。
宝耶需努力
2022/12/13
6840
DHCP欺骗实验操作及防护措施
DHCP配置参数说明
DHCP配置参数说明】 实验拓扑搭建 从DHCP自动获取IP地址的方法: 1、创建DHCP地址池 2、在端口下创建接口DHCP 在端口下创建接口DHCP: SW1配置参数 [SW1]vlan batch 10 20 [SW1]interface Ethernet0/0/1 [SW1-Ethernet0/0/1]display this # interface Ethernet0/0/1 port link-type access port default vlan 10 # return [
宝耶需努力
2022/12/13
7390
DHCP配置参数说明
推荐阅读
相关推荐
华为ensp实验——DHCP
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档