新装Ubuntu后的一些配置

一:Ubuntu 16.04 开启root用户和使用root用户登陆

1. 编辑/etc/lightdm/lightdm.conf
    autologin-guest=false
    autologin-user=root
    autologin-user-timeout=0
    greeter-session=lightdm-gtk-greeter

2. 编辑/root/.profile文件,增加tty -s &&
    tty -s && mesg n || true
二:解决Ubuntu中vi命令的编辑模式下不能正常使用键盘问题

1.输入下述命令以卸载vim-tiny:
sudo apt-get remove vim-common

2.输入下述命令以安装vim:
sudo apt-get install vim
三:ssh能以root用户权限登入Linux

1. vim /ect/ssh/shd_config
2. 注释掉 #PermitRootLogin without-password, 添加 PermitRootLogin yes
四:root用户登入后Tab键不能自动补齐

找到 /root/.bashrc文件进行编辑,最后的三行
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

去掉最后三行的注释(默认是注释掉最后三行的)
然后 在终端上执行以下命令
source ~/.bashrc
posted @ 2018-04-02 07:57  gluo-dreamer  阅读(114)  评论(0编辑  收藏  举报