From bfa75a86b892c30d6f46cc79af74feedd3c317f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E6=99=BA=E7=A0=94?= <3058944672@qq.com> Date: Wed, 15 May 2024 20:54:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?linux=E5=9F=BA=E7=A1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../linux\345\237\272\347\241\200.txt" | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 "\350\203\241\346\231\272\347\240\224/linux\345\237\272\347\241\200.txt" diff --git "a/\350\203\241\346\231\272\347\240\224/linux\345\237\272\347\241\200.txt" "b/\350\203\241\346\231\272\347\240\224/linux\345\237\272\347\241\200.txt" new file mode 100644 index 0000000..4ca3b58 --- /dev/null +++ "b/\350\203\241\346\231\272\347\240\224/linux\345\237\272\347\241\200.txt" @@ -0,0 +1,31 @@ +Linux +Linux是一套免费使用和自由传播的类Unix操作系统,是一个多用户、多任务、支持多线程和多CPU的操作系统 + +有centos,debian,redhat等 + +命令: +查看IP:IP address show + +更新软件库:apt-get update + +apt-get install net-tools + +安装vim编辑器,默认的是vi编辑器 apt-get install vim : vi 文件名,变成vim 文件名 + +安装ssh:apt-get install ssh + +vim /etc/ssh/sshd_cofnig :修改/etc/ssh/sshd.config 文件 + +开22端口:prot 22 + +允许root登录为yes:PermitRootLogin yes + +启用密码验证功能 :PasswordAuthentication yes + +不允许空密码登录:PermitEmptyPassword no + +// 用sudo 命令,但这个默认是没安装。自己安装 apt-get isntall sudo + +su root 更换给root模式 + +sudo vim /etc/sudoers \ No newline at end of file -- Gitee From 36d90eaa4dc8aac690dd96cbf97bec045c966cf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E6=99=BA=E7=A0=94?= <3058944672@qq.com> Date: Tue, 21 May 2024 13:19:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?linux=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../linux\344\275\234\344\270\232.txt" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "\350\203\241\346\231\272\347\240\224/linux\344\275\234\344\270\232.txt" diff --git "a/\350\203\241\346\231\272\347\240\224/linux\344\275\234\344\270\232.txt" "b/\350\203\241\346\231\272\347\240\224/linux\344\275\234\344\270\232.txt" new file mode 100644 index 0000000..6852bf0 --- /dev/null +++ "b/\350\203\241\346\231\272\347\240\224/linux\344\275\234\344\270\232.txt" @@ -0,0 +1,18 @@ +新建一个用户,密码设置 + +sudo adduser 用户名 sudo adduser sx +vim /etc/sudoers 将sx加入sudo组 +sudo deluser --remove-home sx 删除sx用户 +以刚建的用户登录,操作以下 + +su - 用户名 su - sx -是将环境变量一起切换 +使用命令,在自己的家目录,以以下层次依次建立文件夹 + +mkdir -p /home/中国/胡建/龙岩/新罗/闽大/14/zzf +建立一个自己的学号文件写一篇不少于400字的日记 + +nano 2244310317.txt +ctrl + x 保存 +将国家这个文件夹打包 + +tar -cf 中国.tar 中国 打包“中国”的文件夹为“中国.tar” \ No newline at end of file -- Gitee