diff --git "a/20240515Debian\345\256\211\350\243\205.md" "b/20240515Debian\345\256\211\350\243\205.md" new file mode 100644 index 0000000000000000000000000000000000000000..6393cdfac522b7b9ad1e705bfac51410dba8376c --- /dev/null +++ "b/20240515Debian\345\256\211\350\243\205.md" @@ -0,0 +1,50 @@ +## Linux + +- 安装Debian + + - 下载ISO镜像 + - https://www.debian.org/ + - 安装虚拟机 + - VMware Workstation Pro + +- 使用ssh远程连接Debian + + - ```sh + 1.如果没有ssh服务端,需要先安装 + apt-get install ssh -y //普通用户没有权限,需要使用root权限 + + 2.查看ip地址 + ip add show + ifconfig //如果命令未找到,需要安装 net-tools + apt-get install net-tools -y + 3.安装vim编辑器 + apt-get install vim -y + + 4.修改ssh的服务端配置文件 + vim /etc/ssh/sshd_config + Port 22// 开启端口22 + PermitRootLogin yes // 允许root登录 + PasswordAuthentication yes // 采用密码验证模式 + PermitEmptyPasswords no // 禁用空密码 + 重启ssh,配置生效 + systemctl restart ssh + /etc/init.d/ssh restart + + 5.如何借用root权限 + 安装sudo + apt-get install sudo -y + vim /etc/sudoers + ## + ## Allow root to run any commands anywhere + root ALL=(ALL) ALL + 用户名 ALL=(ALL) ALL + + 或 + + 加入sudo用户组 + usermod -aG sudo 要加入的用户名 //加入sudo用户组 + usermod -a -G dialout 要加入的用户名 //加入dialout用户组 使用串口更方便 + + 需要重新登录普通用户 + ``` +