From bb0ce1e3596dcee0f46a4ac7eb7feced332f1c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9D=B0?= <11785149+denglingyan@user.noreply.gitee.com> Date: Wed, 15 May 2024 05:45:44 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=BB=BA=2004=20=E9=99=88?= =?UTF-8?q?=E6=9D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "04 \351\231\210\346\235\260/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "04 \351\231\210\346\235\260/.keep" diff --git "a/04 \351\231\210\346\235\260/.keep" "b/04 \351\231\210\346\235\260/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 3f07c51f5e1b58a006ac998975b4e81dbc78ab2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9D=B0?= <11785149+denglingyan@user.noreply.gitee.com> Date: Fri, 17 May 2024 04:36:26 +0000 Subject: [PATCH 2/3] =?UTF-8?q?linux=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈杰 <11785149+denglingyan@user.noreply.gitee.com> --- ...20240515 \345\210\235\350\257\206Liunx.md" | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 "04 \351\231\210\346\235\260/20240515 \345\210\235\350\257\206Liunx.md" diff --git "a/04 \351\231\210\346\235\260/20240515 \345\210\235\350\257\206Liunx.md" "b/04 \351\231\210\346\235\260/20240515 \345\210\235\350\257\206Liunx.md" new file mode 100644 index 0000000..76a94e6 --- /dev/null +++ "b/04 \351\231\210\346\235\260/20240515 \345\210\235\350\257\206Liunx.md" @@ -0,0 +1,47 @@ +## Liunx + +``` +一种操作系统内核,有centos,debian,redhat等。 +``` + +## 命令 + +### 查看ip地址 + +```js +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 +``` + +### 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 d76dce4e13fa85afc99f1f3ac0a9cb6019e927b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9D=B0?= <11785149+denglingyan@user.noreply.gitee.com> Date: Sun, 19 May 2024 15:58:52 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E5=91=BD=E4=BB=A4=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈杰 <11785149+denglingyan@user.noreply.gitee.com> --- ...20240516 Liunx\347\233\256\345\275\225.md" | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 "04 \351\231\210\346\235\260/20240516 Liunx\347\233\256\345\275\225.md" diff --git "a/04 \351\231\210\346\235\260/20240516 Liunx\347\233\256\345\275\225.md" "b/04 \351\231\210\346\235\260/20240516 Liunx\347\233\256\345\275\225.md" new file mode 100644 index 0000000..d0b9398 --- /dev/null +++ "b/04 \351\231\210\346\235\260/20240516 Liunx\347\233\256\345\275\225.md" @@ -0,0 +1,62 @@ +# 笔记 + +常见的执行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:清屏 + +``` \ No newline at end of file -- Gitee