From 84996853a4c422f389d5fba11d20599fda525e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=91=AB?= <11785109+linxin221@user.noreply.gitee.com> Date: Wed, 15 May 2024 15:49:01 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 linux/.keep diff --git a/linux/.keep b/linux/.keep new file mode 100644 index 0000000..e69de29 -- Gitee From 9be3a010e4543a99f413583449d36b4c9c45d7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=91=AB?= <11785109+linxin221@user.noreply.gitee.com> Date: Wed, 15 May 2024 15:49:31 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20linux=20?= =?UTF-8?q?=E4=B8=BA=20=E6=9E=97=E9=91=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux/.keep => "\346\236\227\351\221\253/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename linux/.keep => "\346\236\227\351\221\253/.keep" (100%) diff --git a/linux/.keep "b/\346\236\227\351\221\253/.keep" similarity index 100% rename from linux/.keep rename to "\346\236\227\351\221\253/.keep" -- Gitee From 56d95ab2f73d8e391cb9c10e8cbdd7bb418b5d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=91=AB?= <11785109+linxin221@user.noreply.gitee.com> Date: Wed, 15 May 2024 16:11:03 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9E=97=E9=91=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 林鑫 <11785109+linxin221@user.noreply.gitee.com> --- .../20240515linux\345\237\272\347\241\200.md" | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "\346\236\227\351\221\253/20240515linux\345\237\272\347\241\200.md" diff --git "a/\346\236\227\351\221\253/20240515linux\345\237\272\347\241\200.md" "b/\346\236\227\351\221\253/20240515linux\345\237\272\347\241\200.md" new file mode 100644 index 0000000..eca8659 --- /dev/null +++ "b/\346\236\227\351\221\253/20240515linux\345\237\272\347\241\200.md" @@ -0,0 +1,29 @@ +# Liunx + +一种操作系统内核,有centos,debian,redhat等。 + +## 命令 + +### 查看ip地址 + +ip addr show + +## ssh + +``` +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 b27ba88e9c3215009d9b744ed924d231cba41b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=91=AB?= <11785109+linxin221@user.noreply.gitee.com> Date: Sun, 19 May 2024 14:39:46 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9E=97=E9=91=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 林鑫 <11785109+linxin221@user.noreply.gitee.com> --- .../20240517linux\347\233\256\345\275\225.md" | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 "\346\236\227\351\221\253/20240517linux\347\233\256\345\275\225.md" diff --git "a/\346\236\227\351\221\253/20240517linux\347\233\256\345\275\225.md" "b/\346\236\227\351\221\253/20240517linux\347\233\256\345\275\225.md" new file mode 100644 index 0000000..13dc5fd --- /dev/null +++ "b/\346\236\227\351\221\253/20240517linux\347\233\256\345\275\225.md" @@ -0,0 +1,63 @@ +## 笔记 + +``` +常见的执行Linux命令的格式: 命令名(command) 选项(options) 参数(arguments) +命令名:表达的是想要做的事情,例如创建用户、查看文件、重启系统等操作。 +选项:用于对命令进行调整 +参数:一般指要处理的文件、目录、用户等资源名称。 + +Linux命令参数的长格式与短格式 +长格式:man --help +短格式:man -h +``` + +### 目录命令 + +``` +/ 是指根目录:就是所有目录最顶层的目录 + +./ 表示当前目录: +./ 一般需要和其他文件夹或者文件结合使用,指代当前目录下的东西 +cd ./文件夹 切换到当前目录的某个文件夹 +.. 表示上级目录: +cd .. 切换到上级目录 +cd ../文件夹 切换到上级目录中的某个文件夹 +``` + +### 常用命令 + +``` +cat(concatenate):它的主要作用是用于查看和连接文件。 +语法:cat [选项] [文件] +ls(list directory contents):用于显示指定工作目录下之内容(列出目前工作目录所含的文件及子目录) +语法:ls [-alrtAFR] [name...] +ls / (以下是/根目录所有目录) +bin dev lib media net root srv upload www +boot etc lib64 misc opt sbin sys usr +home lost+found mnt proc selinux tmp var +ls /bin 则显示bin目录下所有文件目录 + +mv(move file):用来为文件或目录改名、或将文件或目录移入其它位置。 +语法:mv [options] source(源文件或目录) dest(目标文件或目录) +``` + +### 按键和它的作用 + +``` + 按键 作用 +空格键 向下翻一页 +PaGe down 向下翻一页 +PaGe up 向上翻一页 +home 直接前往首页 +end 直接前往尾页 + / 从上至下搜索某个关键词 + ? 从下至上搜索某个关键词 + n 定位到下一个搜索到的关键词 + N 定位到上一个搜索到的关键词 + q 退出帮助文档 + +双击Tab键能够实现对命令、参数戒文件的内容补全; +Ctrl+C用于终止当前迚程的运行; +Ctrl+D表示键盘输入结束; +Ctrl+l会清空当前终端中已有的内容(相当亍清屏操作)。 +``` -- Gitee