From d2a86d7d6f5c4eb60ee7d7afc7def98edb907a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=88=92=E6=B1=B6?= <3228916049@qq.com> Date: Wed, 15 May 2024 15:22:20 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E6=9D=8E=E8=88=92?= =?UTF-8?q?=E6=B1=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\235\216\350\210\222\346\261\266/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\235\216\350\210\222\346\261\266/.keep" diff --git "a/\346\235\216\350\210\222\346\261\266/.keep" "b/\346\235\216\350\210\222\346\261\266/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 634bcd09343a0d58a3ce30372b8ef5a65f4215e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=88=92=E6=B1=B6?= <3228916049@qq.com> Date: Wed, 15 May 2024 15:27:05 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李舒汶 <3228916049@qq.com> --- .../20240515Linux.md" | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 "\346\235\216\350\210\222\346\261\266/20240515Linux.md" diff --git "a/\346\235\216\350\210\222\346\261\266/20240515Linux.md" "b/\346\235\216\350\210\222\346\261\266/20240515Linux.md" new file mode 100644 index 0000000..46efb4f --- /dev/null +++ "b/\346\235\216\350\210\222\346\261\266/20240515Linux.md" @@ -0,0 +1,67 @@ +## LINUX + +一种操作系统内核,有centos,debian,redhat等。创建于1991年的基于UNIX的开源操作系统。Linux操作系统还带有图形用户界面(GUI),其中包含一些日常使用的必要软件。它也用于运行Linux的台式计算机,移动设备,游戏机,数字存储设备,电子书阅读器,照相机,录像机中。 + +### SSH登录 + +#### 查看ip地址 + +``` +ip addr show +``` + +#### 更新数据 + +``` +apt-get update +apt-get install net-tools +ifconfig +``` + +### ssh: + +``` +apt-get update 更新软件库 +apt-get install ssh 安装ssh +``` + +安装ssh服务端后,可以用电脑的ssh客户端连接 + +``` +ssh -l 用户名 ip +ssh root@ip +``` + +``` +apt-get install vim 安装vim +vim /etc/ssh/sshd_config +``` + +按 i 进入编辑模式 + +``` +port 22 //开启端口222,将前面的#去掉 +PermitRootLogin yes // 允许root登录,将前面的#去掉 +PasswordAuthentication yes // 使用密码验证的模式,将前面的#去掉 +PermitEmptyPasswords no // 禁用空密码 ,将前面的#去掉 +``` + +按esc退出编辑模式,按住shift: ,再输入wq!,强制保存 + +重启ssh + +``` +systemctl restart ssh +/etc/init.d/ssh restart +systemctl status ssh //查看状态 +``` + +### sudo: + +``` +su root 更换给root模式 +apt-get install sudo +sudo vim /etc/sudoers +root all=(all:all) all +用户名 all=(all:all) all 添加用户名 +``` \ No newline at end of file -- Gitee From 257b26c91ca6714f6d2c86bae11482c47dc0fced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=88=92=E6=B1=B6?= <3228916049@qq.com> Date: Wed, 15 May 2024 15:27:13 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=9D=8E=E8=88=92=E6=B1=B6/.keep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\235\216\350\210\222\346\261\266/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "\346\235\216\350\210\222\346\261\266/.keep" diff --git "a/\346\235\216\350\210\222\346\261\266/.keep" "b/\346\235\216\350\210\222\346\261\266/.keep" deleted file mode 100644 index e69de29..0000000 -- Gitee