一、ubuntu16.04 安装图形界面
apt-get update
apt-get upgrade
apt-get install ubuntu-desktop
reboot
此时只能guest登录
cd /usr/share/lightdm/lightdm.conf.d
chmod 777 50-ubuntu.conf
继续:vi 50-ubuntu.conf
文件 /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
修改前
[Seat:*]
user-session=ubuntu
修改后
[Seat:*]
user-session=ubuntu
greeter-show-manual-login=true
allow-guest=false
# 文件 /root/.profile
# 文件修改前
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n || true
# 文件修改后
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
tty -s && mesg n || true
二、基本命令
1.查看系统、内核
cat /etc/os-release
uname -mrs
2.查看CPU
grep “CPU” /proc/cpuinfo
3.运行时间
uptime
4.查看系统位数
getconf LONG_BIT
5.查看硬盘和分区
df -h
6.软件安装与卸载 centos和ubuntu不同
yum update #更新系统
yum makecache #更新软件源缓存
yum search 软件名 #搜索软件
yum install 软件名 #安装软件
yum remove 软件名 #卸载软件
7.软件的管理
service软件名 start #启动
service软件名 restart #重启
service软件名 stop #关闭
service软件名 status #状态
8.文件与文件夹管理
touch 文件名 #创建文件
mkdir –p a/b/c/d #递归创建文件夹
cp a.a b.b #复制文件
mv a.a c.c #重命名或者复制
chmod 0755 d/ #目录权限
chown –R 用户名:用户组 e/ #目录归属
rm a.bc -rf #删除文件/文件夹
9.文件的下载
wget http://下载地址
wget https://mirrors.aliyun.com/centos/7.3.1611/isos/x86_64/CentOS-7-x86_64-DVD-1611.torrent
10.压缩与解压
压缩:tar zcvf node-v4.5.0.tar.gz
解压:tar zxvf node-v4.5.0.tar.gz