当前位置:网站首页>【Debian】Debian使用笔记
【Debian】Debian使用笔记
2022-06-23 21:02:00 【DDGarfield】
家里有一个古老的笔记本,还是大一购买的,也十年了,“退役”后,装着CentOS,一直扮演着私人服务器的角色。好久不用,不知道是硬件的进一步的老化,还是因为其他玄学问题,只要一登录,系统就会重启,拿着原来装系统的U盘,竟然连安装界面都无法进入。博主决定重新选一个轻量级的linux发行版,最后锁定到debian,没想到出奇的好用。 下面就记录一下安装使用过程,做个笔记吧。
1.忘记root密码怎么办?
刚装完系统,发现并不能登录root;博主一度认为是忘记了密码(事实上不是),将错就错:
- 进入系统引导界面
- 按
e进入GRUB引导菜单再按e进入编辑,进入编辑红色框中内容,将ro替换为rw init=/bin/sh;**
- 修改后,
ctrl+x进行保存,系统会自动重启进入单用户模式,输入passwd root,系统会提示输入两遍密码(输入密码不可见),当看到successfully表明密码修改成功! ctrl+alt+del重启
2.怎样允许root用户直接登录?
默认情况下debian是不允许以root用户登录的,只能以其他用户登录系统中,然后su到root用户下进行操作。白忙活,不过之前设置的密码博主也不喜欢,改了更好,^_^。
#切换用户至root
su root
修改/etc/gdm3/daemon.conf
在[security]节点增加:
[security]
AllowRoot = true
修改/etc/pam.d/gdm-password
注释掉下面内容:
#auth required pam_succeed_if.so user != root quiet_success
3.怎样能让root通过ssh登录?
本本过于老化,按键已经不够灵敏了,需要通过类似xshell的终端工具进行远程登录操作。
修改/etc/ssh/sshd_config
#PermitRootLogin prohibit-password
#修改为
PermitRootLogin yes
重启ssh
/etc/init.d/ssh restart
#或者
service sshd restart
4.怎样连接wifi?
连接wifi还用单独写一节?没错,需要,因为我并没有装桌面环境,需要通过命令改配置。
列出网卡列表
sudo iwlist scan
#我这边无线网卡 wlp3s0
配置无线网络
sudo vi /etc/network/interfaces
auto wlp3s0
iface wlp3s0 inet dhcp
pre-up ip link set wlp3s0 up
pre-up iwconfig wlp3s0 essid ssid
wpa-ssid CMCC
wpa-psk CMCC_PWD
wlp3s0指代的是网卡CMCC就是wifi的ssid,通俗一点就是你家wifi名称CMCC_PWD就是密码
启用无线网络
上面的配置文件wq保存以后,执行下面的命令:
sudo ifup wlp3s0
如果有wifi管理的界面,就可以看到又有一台新设备连接到wifi了。
5.vi操作不能使用退格键?
发现debian下的vi并不能通过退格键进行删除操作,不能使用光标进行上下行移动,仅仅只能通过左右移动光标在一行文本中进行移动,使用命令进行操作,博主能马上记得的命令就是dd:删除当前整行。
#删除当前光标下的字符
x
#删除光标之后的单词剩余部分
dw
#删除光标之后的该行剩余部分
d$
dd
#功能和d相同,区别在于完成删除操作后进入INSERT MODE
c
#删除当前行,然后进入INSERT MODE
cc
我们还是想正常的使用方向键和退格键,毕竟好多年的习惯:
vi /etc/vim/vimrc.tiny
#输入下面两行
set nocompatible
set backspace=2
切换至非兼容模式,并且退格键也可以正常使用
------------------- End -------------------
边栏推荐
- JS takes two decimal places
- How to separate image processing? What should I pay attention to when separating layers?
- Summary of multiple methods for obtaining the last element of JS array
- How to process the text of a picture into a table? Can the text in the picture be transferred to the document?
- [golang] reexamine closures from the perspective of go language
- ASP. Net MVC and asp Net web form
- Cobalt Strike Spawn & Tunnel
- Where should DNS start? I -- from the failure of Facebook
- [golang] quick review guide quickreview (II) -- slice
- Implementation of flashback query for PostgreSQL database compatible with Oracle Database
猜你喜欢

JS advanced programming version 4: generator learning

3000 frame animation illustrating why MySQL needs binlog, redo log and undo log
Application of JDBC in performance test
Implementing MySQL fuzzy search with node and express

Yaokui tower in Fengjie, Chongqing, after its completion, will be the safety tower for Sichuan river shipping with five local scholars in the company

重庆 奉节耀奎塔,建成后当地连中五名进士,是川江航运的安全塔

FPGA based electromagnetic ultrasonic pulse compression detection system paper + source file

Use of the vs2022scanf function. An error is reported when using scanf - the return value is ignored: Solutions

Applet development framework recommendation
随机推荐
[JS reverse hundred examples] anti climbing training platform for netizens question 6: JS encryption, environment simulation detection
Process injection
重庆 奉节耀奎塔,建成后当地连中五名进士,是川江航运的安全塔
Cobalt Strike Spawn & Tunnel
实现vscode写markdown文档+图片自动上传至腾讯云cos
[hot sales at the beginning of the year] | the first special offer of popular cloud products is second to none, and the first year of 1-core 2G cloud server is 38 yuan!
How to make a material identification sheet
同花顺网上开户安全吗,佣金高不高
Use of the vs2022scanf function. An error is reported when using scanf - the return value is ignored: Solutions
Fortress deployment server setup operation guide for novices
How to make a commodity price tag
JS chain call
【Golang】来几道题以加强Slice
[golang] type conversion summary
Bypass memory integrity check
. Net Core 3. X MVC built-in log extension log4net
Using asp Net core MVC framework for building web applications
[open source] goravel (golang Web Framework) - new cache module
券商选哪个比较好尼?本人小白不懂,在线开户安全么?
. NET Core . NET Framework