一: mkdir 创建目录
1:mkdir /a 在根目录下创建 a 目录
2:mkdir /a /b /c 在根目录下创建 a,b,c 目录
3:mkdir -p /test/a/b 加了参数 P, 如果根目录下没有 test 目录, 也会创建成功
二: echo 显示一行文本
1:echo hello 在命令行输出 hello
2:echo hello> a.txt 在 a.txt 文件中写入 hello(注意是清除所有内容然后写入, 要是 a.txt 文件不存在则主动创建)
cat a.txt
hello
3: echo hello form a.txt>> a.txt 在 a.txt 文件中追加内容
- cat a.txt
- hello
- hello form a.txt
三: ifconfig 显示或设置网络设备
四: ping ip / 域名
1:ping 127.0.0.1 检查自己主机是否联网
来源: http://www.bubuko.com/infodetail-3141804.html