简要总结:
CLI:linux字符界面下的显示设备
物理终端:/dev/tty0
x86 显卡驱动 VGA
no_x86 frame buffer (贞缓冲)
虚拟终端:/dev/tty1-tty6
programe:mingetty
串行终端:/dev/ttyS* /dev/xvc0, 虚拟主机下的Linux
串行终端配置文件:/etc/inittab init
programe:agetty
系统控制台:/dev/concle (/dev/tty0, /dev/db0)虚拟
配置concle=ttyS0 concle=ttyS1
模拟终端:/dev/pts/N
-->xwindow, terminal, ssh, telnet, screen
GUI:
窗口管理器
桌面
X &-->xterm-->twm(窗口管理器)-->gdm(GNOME登录管理)-->gnome-session
/etc/X11/prefdm
system-config-display [--reconfig] 恢复默认值
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
linux主机的一些安全配置:
xhost + IP 基于IP的可显示窗口,给谁授予权限
xhost -
客户端的配置
echo $DISPLAY
export DISPLAY=IP:1.0 (第一个显示器的第一个窗口)
nohup-->screen
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
权限分配:/etc/sudoers
su sudo
visudo
格式:who where=(who) what
如果是以组的形式
User_Alias NETMANAGER=A,B,C,D
Host_Alias NET=192.168.0.0/24
Cmnd_Alias NETWORK=/sbin/ifconfig,/bin/netstat
如:NETMANAGER NET=(root) NETWORK,NOPASSWD:/usr/sbin/useradd
使普通用户拥有某一命令的使用权限
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
软件包的管理
rpm -i,e,UF,q,V
--nodeps (忽略依赖关系)
--replaceplgs (替换原有的软件包,重新安装)
--force (强制安装)
--test (测试而不进行安装)
rpm -qa gpg-pubkey
rpm --import /etc/pki/rpm-gpg/RPM-....
rpm -K
--checksig
恢复rpm数据库:rpm --initdb/rpm --rebuilddb
yum install
remove
update
check-update(想看需要升级的软件包)
upgrade
downgrade
list
info
provides
clean
search
groupinstall
groupremove
groupupdate
grouplist
groupinfo
localinstall
localupdate
reinstall
deplist
repolist
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
查看分区 cat /etc/partitions
挂载一块硬盘,用脚本实现自动挂载和格式化
#!/bin/bash
echo "n
p
1
1
17
n
p
2
14
257
w" |fdisk /dev/sdb
mke2fs -j /dev/sdb1
mke2fs -j /dev/sdb2
mkdir /mnt/sdb1
mkdir /mnt/sdb2
mount /dev/sdb1 /mnt/sdb1
mount /dev/sdb2 /mnt/sdb2
如果想实现光盘的自动挂载需要要配置/etc/fstab文件
另外自动挂载有:gnome-mount, gnome-umount
gnome-mount -t -d /dev/cdrom
-t(text), -d(mountd by device file)
mount -t ext3 -o remount,rw /dev/sda5 /mnt
查看:/etc/mtab
fdisk -l
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
查看主机版本号:cat /etc/redhat-release
查看当前级别:runlevel, who -r
以后再续...
阅读(774) | 评论(0) | 转发(0) |