1、开启Linux操作系统,要求以root用户登录GNOME图形界面,语言支持选择为汉语

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_02

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_03


2、使用快捷键切换到虚拟终端2,使用普通用户身份登录,查看系统提示符

Ctrl+ALT+F2


linux下如何切换终端的python虚拟环境 linux切换终端命令_虚拟终端_04

3、使用命令退出虚拟终端2上登录的用户

exit

 4、使用快捷键切换到虚拟终端5,使用管理员身份登录,查看系统提示符

Ctrl+Alt+F1

 5、使用命令退出虚拟终端5上登录的用户

exit

 6、切回图形界面,右单击桌面打开终端,输入关闭系统的命令

init 0

 7、查看哪些用户在系统上工作

w

 8、修改当前时间为2018年8月26号11:28

date -s 11:28 8/26/2018

9、查看2015年10月份日历

cal 10 2015

10、使用两种方法查看ls命令的使用说明

(1)ls --help; (2)man ls

 11、清除屏幕

clear

12、使用“useradd tom”命令新建tom用户,为tom用户设置密码“123”

useradd tom
passwd tom

 13、切换当前用户为tom

su - tom

 14、查看当前登陆Linux系统所使用的用户名

w或者w -h或w -u或w -s

 15、开启Linux操作系统,要求以root用户登录GNOME图形界面

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_02

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_03


16、右击桌面打开终端,使用“useradd lucy”命令创建lucy用户

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_08


17、使用鼠标点击的方法进入根目录

18、点击进入root用户的家目录

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_09

19、点击进入lucy用户的家目录

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_10

20、点击进入用来存放常用的可执行文件的目录

linux下如何切换终端的python虚拟环境 linux切换终端命令_当前目录_11

21、点击进入用来存放系统的可执行文件的目录

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_12

22、点击进入设备文件目录

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_13

23、点击进入配置文件目录

linux下如何切换终端的python虚拟环境 linux切换终端命令_虚拟终端_14

24、创建目录wg

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_15


使用绝对路径的方法在wg目录下新建文件a.txt

linux下如何切换终端的python虚拟环境 linux切换终端命令_root用户_16

24、进入wg目录

cd /etc/wg

 25、使用相对路径的方法在当前目录下新建wg01目录和b.txt文件

mkdir wg01;touch b.txt

 26、以长列表格式列出当前目录下的内容

ls -l

 27、删除空目录wg01

linux下如何切换终端的python虚拟环境 linux切换终端命令_当前目录_17

28、进入上一级工作目录

cd ..

 29、强制删除非空目录wg

rm -rf wg/

 30、复制/etc/passwd到当前目录,名为file1

cp /etc/passwd file1

 31、不停的以只读的方式查看file1文件的内容

tail -f file1

 32、查看file1文件的前3行内容

head -n 3 file1

 33、查看file1文件的后2行内容

tail -n 2 file1

 34、以百分比的方式分页查看file1文件的内容

more file1

 35、以上下翻页的方法分页查看file1文件的内容

less

 36、创建如下目录结构

sh-3.2# tree /FtpServer/

/FtpServer/

├── bin

│   ├── register.py

│   └── start.py

├── conf

│   └── settings.py

├── core

│   └── server.py

├── db

│   └── user.db

├── lib

│   └── common.py

└── log

    └── access.log

linux下如何切换终端的python虚拟环境 linux切换终端命令_虚拟终端_18

1:切换到路径/tmp下,以追加的方式往start.py内写入内容

echo "****" >> /tmp/start.py

 2:查看当前所在的路径

pwd

 3:切换到log目录下,新建目录access,然后把access.log移动到该目录下。

mkdir  /log/access
mv access.log /log/access

 4:切换到core目录下,然后在该路径下新建auth.py文件

cd /FtpServer/core
touch auth.py

 5. 开启两个终端,一个终端往access.log文件中追加内容,然后在另外一个终端动态查看access.log新增的内容。

linux下如何切换终端的python虚拟环境 linux切换终端命令_虚拟终端_19

6. 关闭上述的终端,然后以覆盖的方式往access.log中写入内容

echo "****"  < access.log

 7: 删除/FtpServer目录

rm -rf /FtpServer