From 3560de23ba0f7a56f55d7d8a229e557a7fd8e274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=8E=AE=E9=94=8B?= <295357613@qq.com> Date: Wed, 15 May 2024 20:29:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20240515 \350\256\244\350\257\206liunx.md" | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "36\351\203\221\347\216\256\351\224\213/20240515 \350\256\244\350\257\206liunx.md" diff --git "a/36\351\203\221\347\216\256\351\224\213/20240515 \350\256\244\350\257\206liunx.md" "b/36\351\203\221\347\216\256\351\224\213/20240515 \350\256\244\350\257\206liunx.md" new file mode 100644 index 0000000..bec4dda --- /dev/null +++ "b/36\351\203\221\347\216\256\351\224\213/20240515 \350\256\244\350\257\206liunx.md" @@ -0,0 +1,29 @@ +# Liunx + +一种操作系统内核,有centos,debian,redhat等。 + +## 命令 + +### 查看ip地址 + +ip addr show + +## ssh + +```js +apt-get install ssh + +apt-get install vim + +vim /etc/ssh/sshd_config + +port 21 打开端口 + +permitrootlogin yes 启用root登录 + +passwordauthentication yes 验证密码 + +permitemptypasswords no 禁止使用空密码登录 + +/etc/init.d/ssh restart +``` \ No newline at end of file -- Gitee From 2df07795fda30e71dd40fb59cdbf2fa44612c269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=8E=AE=E9=94=8B?= <295357613@qq.com> Date: Sun, 19 May 2024 23:31:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...33\256\345\275\225\347\273\223\346\236\204.md" | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 "36\351\203\221\347\216\256\351\224\213/Linux\347\233\256\345\275\225\347\273\223\346\236\204.md" diff --git "a/36\351\203\221\347\216\256\351\224\213/Linux\347\233\256\345\275\225\347\273\223\346\236\204.md" "b/36\351\203\221\347\216\256\351\224\213/Linux\347\233\256\345\275\225\347\273\223\346\236\204.md" new file mode 100644 index 0000000..1509362 --- /dev/null +++ "b/36\351\203\221\347\216\256\351\224\213/Linux\347\233\256\345\275\225\347\273\223\346\236\204.md" @@ -0,0 +1,15 @@ +## 目录结构 + +```js +Bin: binary 二进制.存储的都是二进制文件,文件可以被运行 +Dev: 存放的是外接设备,例如u盘,光盘.是不能被直接使用的,需要挂载(分配盘符) +Etc:主要存储一些配置文件 +Home:除root用户以外的其他用户的家目录,类似windows下的User/用户目录 +Proc:process,表示进程,存储的是Linux运行时的进程 +Root:root用户的家目录 +Sbin:super binary,存储一些必须有super权限的用户才能执行的二进制文件 +Tmp:表示"临时",存储系统运行时产生的临时文件 +Usr:存放的是用户自己安装的软件,类似于windows下的program files +Var:存放的程序/系统的日志文件 +Mnt:当外接设备需要挂载时,就需要挂载到该目录 +``` \ No newline at end of file -- Gitee From cc79e0d2404036915fc29f69762ca473b7fc14f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=8E=AE=E9=94=8B?= <295357613@qq.com> Date: Tue, 21 May 2024 12:36:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20240520 \347\273\203\344\271\240.md" | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 "36\351\203\221\347\216\256\351\224\213/20240520 \347\273\203\344\271\240.md" diff --git "a/36\351\203\221\347\216\256\351\224\213/20240520 \347\273\203\344\271\240.md" "b/36\351\203\221\347\216\256\351\224\213/20240520 \347\273\203\344\271\240.md" new file mode 100644 index 0000000..b9bc1b7 --- /dev/null +++ "b/36\351\203\221\347\216\256\351\224\213/20240520 \347\273\203\344\271\240.md" @@ -0,0 +1,33 @@ +新建一个用户,密码设置 + +``` +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” +``` + -- Gitee