diff --git "a/20\346\234\261\347\216\211\346\225\217/20240515-Linux \345\237\272\347\241\200.md" "b/20\346\234\261\347\216\211\346\225\217/20240515-Linux \345\237\272\347\241\200.md" new file mode 100644 index 0000000000000000000000000000000000000000..4cdeb976428cb407c78f580a8070c9ca4d0e9cb5 --- /dev/null +++ "b/20\346\234\261\347\216\211\346\225\217/20240515-Linux \345\237\272\347\241\200.md" @@ -0,0 +1,53 @@ +#### Linux 基础 + +1. Linux是操作系统的内核 + - RedHat 收费商业版本,Centos 是RedHat的社区版本 很流行 + - Debian 命令行为主,Ubantu 是以Debian+桌面皮肤的版本 + - 类似显卡的核心,N卡A卡相当于内核,不同商家出的具体的型号的显卡,相当于发行版本 + +2. 学习Debian的两种方式 + - 虚拟机,再安装debian,快照:对服务器进行存档 + - 服务器 + +3. 虚拟机VM 17版本+Debian 12.5 64位的ISO文件 + + 1. 先安装Vm,再创建一个新的虚拟机 + 1. 下载Debian的安装镜像 https://www.debian.org/ + +4. 直接再虚拟机上操作很麻烦,需用ssh远程登录 +5. 默认的Debian没有安装ssh服务端 + +```js +apt-get install ssh -y // 需要root权限,安装SSH服务端 +ip addr show // 查看IP地址 +ifconfig // 需要root权限,可以借权sudo +// 以上两步,就可以让我们用普通用户远程登录了,但是默认下root是不可以直接登录的。需对ssh做配置 + +// 为了方便我们编辑文件。安装一个vim编辑器,默认是vi +``` + +6. 修改ssh的服务端配置文件 + +```js +vim /etc/ssh/sshd_config +Port 22// 开启端口22 +PermitRootLogin yes // 允许root登录 +PasswordAuthentication yes // 采用密码验证模式 +PermitEmptyPasswords no // 禁用空密码 +``` + +7.借用root权限 + +```js +1. 安装sudo +apt-get install sudo -y +2. 将普通用户名加入 +vim /etc/sudoers +## +## Allow root to run any commands anywhere +root ALL=(ALL) ALL +用户名 ALL=(ALL) ALL + +``` + +8.重新登录普通用户就可以sudo功能 \ No newline at end of file diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 7ecb642315b1305938427e7c7924cb8aa64f86f2..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# Linux基础 - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index cda094fa37a081f0932af0bd52dc12718d684b00..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Linux基础 - -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)