|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 实验环境: 宿主机为win11,网络:10.255.50.5 6389 WSL2 ubuntu 目标机的OS:Ubuntu 内核、版本如下: linux@peggy0223:/$ uname -r 5.15.146.1-microsoft-standard-WSL2 linux@peggy0223:/$ cat /proc/version Linux version 5.15.146.1-microsoft-standard-WSL2 (root@65c757a075e2) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Jan 11 04:09:03 UTC 2024 本次实验就换了一个环境,并非vmware下的ubuntu2004,使用了前几天安装的WSL2,有兴趣的同学可以查看帖子----CSDN |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 实验前: a、先创建root账户 rt b、测试下网络,方便后续安装所需的工具包
c、查看ip(留个疑问,这里的IP 是172.28.137.241/20与宿主机10.255.50.5有什么关系?)
d、安装所需的工具:net-tools linux@peggy0223:/$ su root Password: root@peggy0223:/# apt install net-tools Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: net-tools 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 204 kB of archives. After this operation, 819 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60+git20181103.0eebece-1ubuntu5 [204 kB] Fetched 204 kB in 2s (111 kB/s) Selecting previously unselected package net-tools. (Reading database ... 24208 files and directories currently installed.) Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1ubuntu5_amd64.deb ... Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ... Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ... Processing triggers for man-db (2.10.2-1) ... 然后就可以使用ifconfig -a了 |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 现在开始实验内容:(p405,文件、目录操作命令)内容会尽量丰富点,大家按书本的实验内容做即可。 |
| 复习常用的命令:pwd、cd、mkdir、cat、cp、rm、mv、chown、chmod、echo、more、less、tar、man、find、compress、uncompress、gzip、gunzip、alias 实验内容: 一、目录切换pwd、cd'~'、'-'、'.'、'/'、'../..'等的意义,如图,请自行理解 二、echo、cat、more、less、cp、rm、mv结合对文本\文件的操作使用
三、mkdir、chown、chmod
四、tar、alias、gzip、gunzip compress、uncompress在unbutu中可用gzip替代,
root@peggy0223:/home/linux# apt install bzip2
五、man、find、alias
find的命令略。 以上命令熟悉后,建议结合课本自学find的命令的使用。 |