1. 首页
  2. 技术小贴

Linux使用杂记

16.04开启root登录

技术小贴
技术小贴
sudo passwd root
su root
cd /usr/share/lightdm/lightdm.conf.d/
vim 50-unity-greeter.conf
#添加
user-session=ubuntu
greeter-show-manual-login=true
all-guest=false
#重启
reboot
vi /root/.profile
#把mesg n,修改为:tty -s && mesg n
reboot

Libc版本查看

  • find / -name libc.so.6
  • ll /lib/x86_64-linux-gnu/libc.so.6
    lrwxrwxrwx 1 root root 12 4月 15 06:11 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.23.so
  • sudo ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
Copyright (C) 2018 自由软件基金会。

配置SSH服务

  • apt-get install openssh-server
  • vi /etc/ssh/sshd_config
  • vi /etc/ssh/ssh_config
添加:PermitRootLogin yes

配置双网卡

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.43.110
gateway 192.168.43.1
netmask 255.255.255.0

自用更新源

#ubuntu
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

 

原创文章,作者:小嵘源码,如若转载,请注明出处:https://www.lcpttec.com/linuxsy/

联系我们

176-888-72082

在线咨询:点击这里给我发消息

邮件:2668888288@qq.com

工作时间:周一至周五,9:00-18:00,节假日休息

QR code