diff --git "a/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" "b/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" new file mode 100644 index 0000000000000000000000000000000000000000..56e0e969674e405293b2e2cc71090694fb0d7f09 --- /dev/null +++ "b/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" @@ -0,0 +1,68 @@ +#### 💕安装虚拟机和Debian💕 + +1. Linux是操作系统的内核,以其为基础会有很多发行的版本,RedHat,Centos,Ubantu,Debian + + * RedHat:收费商业版本 + * Centos:是RedHat的社区版本 + * Ubantu:是以Debian+桌面皮肤的版本 + * Debian:以命令行为主 + +2. 学习Debian的两种方式 + + * 安装虚拟机 + * 利用阿里云,华为云,腾讯云,也可以利用快照功能,对服务器进行存档 + +3. 虚拟机 + + * 虚拟机VM 17版本+Debian 12.5 64位的ISO文件 + + * 先安装VM,再创建一个虚拟机 + + * 下载镜像文件:(https://www.debian.org/) + + * 直接再虚拟机操作Debian 很麻烦,要用ssh远程登录 + + * ```js + ip adde show //查IP + ssh -l 用户名 用户IP//ssh远程登录(管理员cmd) + ``` + + * 默认Debian 没有俺煮给你吃ssh服务端 + + * ```js + apt-get install ssh -y//在超级用户下写root(普通用户可以登录) + ``` + + * 远程登录root需要对ssh进行配置 + + * ```js + apt-get install vim -y + wherein ssh //查看配置文件 + ``` + + * 修改ssh的服务端配置文件/etc/ssh/sshd_config文件 + + * ```js + vim /etc/ssh/sshd_config + port 22 //开启端口22 + PermiRootLogin yes//允许root登录 + PasswordAutentication yes //采用密码验证模式 + PermitEmptyPasswords no//禁用空密码 + systemctl restart ssh//重启ssh,让遂改后的配置生效 + letc/init.d/ssh restart + ``` + + * 如何借用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 + ``` + + \ No newline at end of file