文章目录
Time
ID | Course | Days | Content |
---|---|---|---|
1 | RH124 | 3 | command |
2 | RH134 | 3 | system |
3 | RH254 | 4 | service & security |
必须会的内容*4
- word
- Tab
- man
- echo
Env
-
OS RHEL7
-
GUI MEM>=1G
-
CLI MEM>=512M
Hard Vt-x, 64bit
-
-
Soft VMware
-
Folder 16GB
Topology
VM | host | user | super | MEM |
---|---|---|---|---|
VMware | foundation0 | kiosk%redhat | root%Asimov | >=3GB |
KVM | classroom | instructor%Asimov | root%Asimov | - |
KVM | server | student%student | root%redhat | - |
KVM | desktop | student%student | root%redhat | - |
环境配置
[VMware]
“编辑” / “虚拟网络编辑器”
“更改设置” / 选择“vmnet1”/取消复选“dhcp”
[foundation]
$ rht-vmctl status classroom
$ rht-vmctl start classroom
$ rht-vmctl status classroom
$ ping classroom
Ctrl+C
$ rht-vmctl start desktop
$ ping -c 4 d0
$ ssh student@d0
[desktop0]
$
1. basic
login
RHLE7 | RHEL6 | |
---|---|---|
GLI | Ctrl+Alt+F1 | Ctrl+Alt+F7 |
CUI | Ctrl+Alt+Fx | Ctrl+Alt+Fy |
x in {2…6} | y in {1…6} |
$ cat /etc/shells
[student@desktop0 ~]$
[root@desktop0 ~]#
[username@hostname working_dir] permission
命令基本格式
$ command [-o|–options] [arg]
$ ls
$ ls /etc
$ ls -a
$ ls -a /home
$ ls --all /home
命令示例
$ date
$ date +%y%m%d
$ date --help
$ passwd
Changing password for user student.
Changing password for student.
(current) UNIX password: `student`
New password: `student`
BAD PASSWORD: The password is the same as the old one
New password: `P@ssw0rd`
BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word
New password: `P@33w0rd`
Retype new password: `P@33w0rd`
passwd: all authentication tokens updated successfully.
Tab
- 一下补全
- 两下列出
- 对象:命令,选项,参数
COMMAND
$ pas<Tab><Tab>
$ pass<Tab>
$ su -
redhat
OPTION
# useradd -<Tab>
# useradd --<Tab><Tab>
# useradd --ui<Tab>
ARG
# ls /<Tab><Tab>
# ls /e<TAB>
history
$ history
$ ls ~/.bash_history
$ echo $HISTSIZE
$ !char
$ !linenumber
2. explorer
Linus Dos+x86 -=> Minix/2000+x86 = Linux
Stoman GNU=Tools
Linux=unix+x86
/usr
路径 PATH
$ cd /
$ cd /etc
$ cd ..
$ cd var/log
$ cd
$ cd ~student
$ cd .
$ cd -
$ pwd
$ cd /var/log
$ ls
$ pwd
$ ls /var/log
查看文件内容
$ cat -n /var/log/messages
$ more /var/log/messages
SPACE, Enter, q
$ less /var/log/messages
SPACE, Enter, q, ↑
$ head /var/log/messages
$ cat -n /var/log/messages | head -n 2
$ tail /var/log/messages
$ cat -n /var/log/messages | tail -n 2
文件、文件夹管理
# mkdir /folder
# ls -d /folder
# touch /folder/file
# ls /folder/file
# cp -r /folder /tmp
# ls -d /tmp/folder
# cp /folder/file /tmp
# ls /tmp/file
# mv /tmp/folder /home
# ls -d /tmp/folder /home/folder
# mv /tmp/file /home
# ls /home/file
# mv /home/folder /home/wjj
# mv /home/file /home/wj
# rm -r /home/wjj
y*n
# rm /home/wj
y
通配符
$ touch {x,y}.txt
$ ls
$ touch {a..d}.txt
$ ls
$ touch {a..c}{1..3}.txt
$ ls
$ ls a*
$ ls ?3*
$ ls [ac]*
$ ls [^ac]*
$ ls [!ac]*
$ ls [ac]*
$ ls {a,c}*
$ ls {a1,c2}*
3. help
man
$ man man
q
$ man passwd
$ man 5 passwd
$ whereis passwd
$ echo $SHELL
$ man bash
/if, 76n
# mandb
# man -k fire
# man firewalld.richlanguage
# man --help
Shift+PgUp / Shift+PgDn
info and pinfo
# info ls
# pinfo ls
/usr/share/doc
# grep -r BOOTPROTO /usr/share/doc/
# vim /usr/share/doc/initscripts-9.49.17/sysconfig.txt
/ifcfg
4. edit file
vim
# vim filename
i
ni hao
wo hao
Esc
:wq
# cat filename
Shortcut. vim
# vim /var/log/messages
:set number
ID | Key | Function |
---|---|---|
1 | h, j, k, l | $ \leftarrow < / k b d > , < k b d > </kbd>, <kbd> </kbd>,<kbd> \downarrow < / k b d > , < k b d > </kbd>, <kbd> </kbd>,<kbd> \uparrow < / k b d > , < k b d > </kbd>, <kbd> </kbd>,<kbd> \rightarrow $ |
2 | gg | 光标跳到首行 |
3 | G | 光标跳到尾行 |
4 | numbergg | 光标跳到指定行 |
5 | numberG | 光标跳到指定行 |
6 | :number | 光标跳到指定行 |
7 | x | 删除一个字母 |
8 | dw | 删除一个单词 |
9 | dd | 删除一行 |
10 | u | undo |
11 | Ctrl+R | redo |
12 | r | replace |
13 | yll | select |
14 | vy | yank |
15 | yw | 复制一个单词 |
16 | yy | 复制一行 |
17 | p | paste |
>,>>
# echo haha
# ls
# echo haha > 1.txt
# echo haha >> 2.txt
# ls
# cat 1.txt
# cat 2.txt
# echo hehe > 1.txt
# echo hehe >> 2.txt
# cat 1.txt
# cat 2.txt
1,2,&
# echo haha
# Echo hehe
# echo haha > 1.txt
# cat 1.txt
# echo haha 1> 1.txt
# cat 1.txt
# Echo hehe 2> 2.txt
# cat 2.txt
# cat 1.txt &>> all.txt
# find / -user student
# find / -user student > 1.txt 2> 2.txt
# cat 1.txt
# cat 2.txt
<,<<
# mail student
bt
nr
.
# mail -s bt1 student
nr1
.
# mail -s bt2 student < 1.txt
# su - student -c mail
3
Space, q
# cat
ni hao
wo hao
Ctrl+D
# cat > file.out
ni hao
wo hao
Ctrl+D
# cat file.out
# cat > file.out <<EOF
ni hao
wo hao
EOF
# cat file.out
|
# passwd --stdin student
student
# echo student | passwd --stdin student
# echo ni hao ma | mail -s btg student
# head -n 8 /var/log/messages | tail -n 1
# cat -n /var/log/messages | head -n 8 | tail -n 1
# cat -n /var/log/messages | head -n 8 | tee file.bk | tail -n 1
grep
# env | grep hist || echo no
# env | grep -i hist
# grep root /etc/passwd
# grep ^root /etc/passwd
# grep nologin$ /etc/passwd
# cat /etc/fstab
# grep ^$ /etc/fstab
# cat /etc/fstab
# grep -v ^$ /etc/fstab
# grep -v ^$ /etc/fstab | grep -v \#
; && ||
# echo haha; echo hehe
# echo haha && echo hehe
# Echo haha && echo hehe
# Echo haha || echo hehe
# echo haha || echo hehe
5. account
user, group
add, mod, del
passwd
chage
/etc/passwd
/etc/shadow
/etc/group
user
/etc/passwd
# grep ^root /etc/passwd; grep student /etc/passwd
# grep -e ^root -e student /etc/passwd
# grep -E '^root|student' /etc/passwd
# egrep '^root|student' /etc/passwd
# man 5 passwd
useradd
# useradd tom
# echo mima | passwd --stdin tom
# (echo mima; echo mima) | passwd tom
usermod
# usermod -l cat tom
# id tom
# id cat
userdel
# grep cat /etc/passwd
# ls -d /home/tom/
# userdel cat
# id cat
# ls -d /home/tom/
# grep cat /etc/passwd
# grep student /etc/passwd
group
# useradd fred
# echo fred1111 | passwd --stdin fred
# egrep 'student|fred' /etc/group
# id student; id fred
# usermod -G wheel fred
# id fred
# usermod -G root fred
# id fred
# usermod -aG wheel fred
# gpasswd -a fred bin
# id fred
# gpasswd -d fred root
# id fred
# groupadd sales
# groupmod -n xiaoshou sales
# groupdel xiaoshou
su
$ echo $PATH
$ su
redhat
# echo $PATH
Ctrl+D
$ su -
redhat
# echo $PATH
sudo
# vim /etc/sudoers
# visudo
OPERATION: /wheel,<o>
fred ALL=(ALL) NOPASSWD: /usr/bin/tail
# su - fred
$ tail /var/log/messages || echo no
$ sudo tail /var/log/messages
/etc/shadow
# egrep -n 'fred|student' /etc/shadow
# chage -l fred
# man 5 shadow
# chage -l student
# chage -d 0 student
# chage -l student
# ssh student@d0
# chage -l student
# chage -m 7 -M 90 -W 14 student
# chage -l student
6. permission
ls
# ls -l anaconda-ks.cfg
# touch anaconda-ks.cfg
# ls -lh
note: partition= inode + block
# getfacl anaconda-ks.cfg
note: .,+
# file anaconda-ks.cfg
# ls -ld /root
# file /root
# ls -l /dev/vda
# file /dev/vda
# ls -l /dev/null
# file /dev/null
chmod
- char
ID | permission | comments | file | folder |
---|---|---|---|---|
1 | r | read | cat | ls |
2 | w | write | > | touch |
3 | x | execute | script | cd |
- num
| rwx | binary | calc | number |
| :–: | :–: | :------------------: | :–: |
| r-- | 100 | 1*22+0*21+02^0 | 4 |
| -w- | 010 | 022+1*21+0*2^0 | 2 |
| --x | 001 | 0*22+0*21+1*2^0 | 1 |
# mkdir /folder
# touch /folder/file
# ls -ld /folder/{.,*}
# chmod go=- /folder
# ls -ld /folder/{.,*}
# chmod u-x,g=rx,o+rx /folder
# ls -ld /folder/{.,*}
# chmod 755 /folder/
# ls -ld /folder/{.,*}
# chmod +x /folder/file
# ls -ld /folder/{.,*}
ID | user | comments |
---|---|---|
1 | u | user |
2 | g | group |
3 | o | other |
4 | a | all |
chown
# ls -ld /folder/{.,*}
# chown student:wheel /folder
# ls -ld /folder/{.,*}
# chown -R student:wheel /folder
# ls -ld /folder/{.,*}
# chown -R fred /folder
# ls -ld /folder/{.,*}
# chown -R :root /folder
# ls -ld /folder/{.,*}
umask
folder
= 777 - umaskfile
= 666 - umask
# umask
# su - student -c umask
# su - student -c "\
mkdir folder && \
touch folder/file && \
ls -ld folder/{.,*}"
rwxrwxrwx
uuugggooo
rwsrwsrwt
NUM | privileges | object | function |
---|---|---|---|
4 | suid | file | 调用文件所属用户身份执行 |
2 | sgid | folder | 新创建文件所属组为文件夹所属组 |
1 | stick | folder | 只有root和所属用户可以删除 |
suid
# which touch
# cp /usr/bin/touch /usr/bin/mo
# chown student /usr/bin/mo
# chmod u+s /usr/bin/mo
# ls -l /usr/bin/mo
# touch root.touch
# mo root.mo
# ls -l root*
# ls -l /usr/bin/passwd /etc/shadow
# chmod u-s /usr/bin/mo
# ll /usr/bin/mo
# chmod 4755 /usr/bin/mo
# ll /usr/bin/mo
sgid
# ls -ld /folder/{.,*}
# touch /folder/new.file
# chown :student /folder
# chmod g+s /folder
# ls -ld /folder/{.,*}
# touch /folder/xin.file
# ls -ld /folder/{.,*}
stick
# ls -ld /tmp/
# su - student -c "
touch /tmp/s{1..3}.txt && \
ls -l /tmp/s[1-3]*"
# rm -rf /tmp/s1.txt
# su - student -c "rm -rf /tmp/s2.txt"
# su - fred -c "rm -rf /tmp/s3.txt"
# ls -l /tmp/s[1-3]*
7. process
ps
# ps -aux
# ps -aux | head -n 2
top
# top
1, h
f, ↑ \uparrow ↑ ↓ \downarrow ↓, Space, s, q
q
kill
# ps -aux
# kill -9 <PID>
jobs
# dd if=/dev/zero of=/dev/null bs=1K &
# dd if=/dev/zero of=/dev/null bs=2K
Ctrl+Z
# jobs
# bg 2
# jobs
# fg 1
Ctrl+C
# kill -9 %1
8. systemctl
systemctl
RHEL7 | RHEL<7 | |
---|---|---|
1 | # systemctl restart DAEMON | # service DAEMON restart |
2 | # systemctl enable DAEMON | # chkconfig DAEMON on |
3 | # systemctl status DAEMON | # service DAEMON status |
4 | # systemctl status DAEMON | # chkconfig --list |
# systemctl -t help
# systemctl get-default
# systemctl status crond
# systemctl status crond -l
# systemctl is-active crond
# systemctl is-enabled crond
# systemctl status crond
debug
# systemctl status DAEMON -l
# vim /var/log/messages
mask
# systemctl is-active iptables
# systemctl is-active firewalld
# systemctl start iptables
# systemctl is-active firewalld && echo off
# systemctl is-active iptables && echo on
# systemctl mask iptables
# systemctl stop iptables
# systemctl start iptables || echo no
9. ssh
~/.ssh/known_hosts
# ssh root@c
yes
Ctrl+C
# cat ~/.ssh/known_hosts
# echo 172.25.0.10 c >> /etc/hosts
# cat /etc/hosts
# ssh root@c
# sed -i '$d' /etc/hosts
# cat /etc/hosts
# ssh root@c
Ctrl+C
ssh
# rm -rf ~/.ssh/config
# host c
# ssh c
Ctrl+C
# ssh instructor@c
Ctrl+C
# ssh instructor@c 'whoami'
Asimov
ssh-keygen
ID | Role | Host |
---|---|---|
1 | server | classroom |
2 | client | desktop0 |
[desktop0]
# ssh root@c
Ctrl+C
# ssh-keygen
Enter*3
# ls ~/.ssh
# cat .ssh/id_rsa.pub
# ssh-copy-id -i .ssh/id_rsa.pub instructor@c
Asimov
# ssh -i .ssh/id_rsa 'instructor@c'
$ cat -n .ssh/authorized_keys
sshd_config PermitRootLogin
[classroom]
# yum search ssh
# rpm -qc openssh-server
# vim /etc/ssh/sshd_config
...
PermitRootLogin no
# rpm -ql openssh-server | grep service
# systemctl restart sshd
# systemctl enable sshd
[desktop0]
# ssh root@c
sshd_config PasswordAuthentication
[classroom]
# vim /etc/ssh/sshd_config
...
PasswordAuthentication no
# systemctl restart sshd
# useradd tom && echo ttt | passwd --stdin tom
[desktop0]
# ssh tom@c || echo no
# ssh instructor@c
10. log
rsyslog
# yum search log
# rpm -qc rsyslog
# vim /etc/rsyslog.conf
# tail -f /var/log/messages
Ctrl+Shift+T
$ ssh student@d0
Alt+1 , Ctrl+C
chrony
ID | Role | host |
---|---|---|
1 | server | classroom |
2 | client | desktop |
[desktop0]
# timedatectl
# timedatectl set-ntp true
# yum search ntp
# rpm -qc chrony
# vim /etc/chrony.conf
...
server classroom.example.com iburst
note:
:3,5d,
w, ctSpace, classroom.example.com,
Esc, ZZ
# systemctl restart chronyd
# systemctl enable chronyd
# timedatectl
11. network
- gnome-control-center / Network
- nmcli
- nmtui
- /etc/sysconfig/network-scripts/ifcfg-eth0
ss
# systemctl status sshd
# ss -antup | grep ssh | cat -n
# ss -atup | grep ssh | cat -n
# ss -aup | grep ssh | cat -n
# ss -atp | grep ssh | cat -n
# ss -at | grep ssh | cat -n
# ss
# grep -n ssh /etc/services | grep 22
# systemctl is-active network
# systemctl is-active NetworkManager
nmcli
# nmcli connection show
# nmcli dev status
# ls /etc/sysconfig/network-scripts/ifcfg-*
# nmcli connection show
# nmcli connection show 'System eth0'
# ip a s eth0
# ip route
# cat /etc/resolv.conf
# man nmcli | grep -A 1 nmcli.*mod
# nmcli con mod 'System eth0' \
connection.autoconnect true \
ipv4.method manual \
ipv4.addresses '172.25.0.10/16 172.25.0.250' \
ipv4.dns 8.8.8.8 \
ipv4.dns-search example.com
# ip a s eth0
# nmcli connection down 'System eth0' && nmcli connection up 'System eth0'
# ip a s eth0
# ip route
# cat /etc/resolv.conf
# cat -n /etc/sysconfig/network-scripts/ifcfg-eth0
# nmcli con mod 'System eth0' ipv4.dns 172.25.254.254
# cat /etc/resolv.conf
# ping - c 2 c
# systemctl restart network
# cat /etc/resolv.conf
# ping - c 2 c
nmtui
[foundation]
# virsh console desktop
Enter
[desktop0]
root
redhat
# cat -n /etc/sysconfig/network-scripts/ifcfg-eth0
# ifup eth0
# Ctrl+D
Ctrl+]
[foundation]
# ping d0
nm-connection-editor
[foundation]
Alt+F2 / rht-vmctl view desktop
[desktop0]
student%student
Alt+F2 / nm-con
Tab
hostname
RHEL7
# cat /etc/hostname
# hostname
# hostnamectl set-hostname d0.example.com
# hostname
# cat /etc/hostname
# hostnamectl
RHEL6
# vim /etc/sysconfig/network
# hostname d0.example.com
# cat /etc/redhat-release
# uname -r
hosts
# grep hosts /etc/nsswitch.conf
# ls /etc/hosts /etc/resolv.conf
# cat /etc/hosts
# ping -c 4 c
# echo 172.25.0.10 c >> /etc/hosts
# ping -c 4 c
# sed -i '$d' /etc/host
$ host d0
$ host 172.25.0.10
$ nslookup 172.25.0.10
$ nslookup desktop0.example.com
12. archive
tar
# dd if=/dev/zero of=/root/f2.txt bs=2M count=1
# ls -lh /root/f*
# tar -cf /root/f.tar f1.txt /root/f2.txt
# ls -lh /root/f*
# tar -tf /root/f.tar
# ls -lh /root/{f*,root}
# touch f*
# tar -xf f.tar
# ls -lh /root/{f*,root}
# tar -xf f.tar -C /home
# ls -lR /home/{f*,root}
# man tar
# tar -czf /root/fa.tar.gz f[12]*
# tar -cjf /root/fa.tar.bz2 f[12]*
# tar -cJf /root/fa.tar.xz f[12]*
# ls -lh /root/f*
# tar -tf /root/fa.tar.bz2
# tar -tf /root/fa.tar.gz
# tar -tf /root/fa.tar.xz
# tar -xf /root/fa.tar.xz -C /tmp
# ls -lh /tmp/f[12]*
scp
[desktop0]
# scp anaconda-ks.cfg instructor@c:/tmp
Asimov
# ssh instructor@c 'ls -l /tmp/anaconda-ks.cfg'
Asimov
# scp instructor@c:/tmp/anaconda-ks.cfg kiosk@172.25.254.250:~/Desktop
Asimov
# ssh kiosk@172.25.254.250 'ls -l ~/Desktop'
redhat
# scp kiosk@172.25.254.250:~/Desktop/anaconda-ks.cfg ..
redhat
# ls -l /anaconda-ks.cfg
sftp
[desktop0]
# sftp instructor@c
instructor@c\'s password: `Asimov`
Connected to c.
sftp> help
sftp> pwd
Remote working directory: /home/instructor
sftp> !pwd
/root
sftp> ls
sftp> !ls
anaconda-ks.cfg
sftp> put anaconda-ks.cfg
Uploading anaconda-ks.cfg to /home/instructor/anaconda-ks.cfg
anaconda-ks.cfg 100% 8619 8.4KB/s 00:00
sftp> cd /tmp
sftp> pwd
Remote working directory: /tmp
sftp> ls *.cfg
anaconda-ks.cfg
sftp> lcd /home
sftp> get anaconda-ks.cfg
Fetching /tmp/anaconda-ks.cfg to anaconda-ks.cfg
/tmp/anaconda-ks.cfg 100% 8619 8.4KB/s 00:00
sftp> !ls
anaconda-ks.cfg student
sftp> quit
rsync
# rsync -av root@c:/home /tmp
# rsync -av root@c:/home /tmp
# ssh root@c 'touch /home/file'
# rsync -av root@c:/home /tmp
# ls /tmp/home/
# cat /tmp/home/file
# ssh root@c 'echo haha >> /home/file'
# rsync -av root@c:/home /tmp
# cat /tmp/home/file
# ssh root@c 'sed -i "s/a/e/g" /home/file'
# rsync -av root@c:/home /tmp
# cat /tmp/home/file
# ssh root@c 'rm -f /home/file'
# rsync -av root@c:/home /tmp
# cat /tmp/home/file
13. rpm
rpm
# wget http://c/content/rhel7.0/x86_64/dvd/Packages/httpd-2.4.6-17.el7.x86_64.rpm
# ls *.rpm
# rpm -ivh *.rpm || echo no
# yum -y install httpd
# yum list httpd
# yum -y remove httpd
# yum list httpd
# rpm -ivh *.rpm
# rpm -q httpd
# rpm -e httpd
# rpm -q httpd
# rpm -qa
# rpm -ql httpd || eco no
# rpm -qlp httpd-2.4.6-17.el7.x86_64.rpm
# rpm -qp --scripts httpd-2.4.6-17.el7.x86_64.rpm
# rpm -i httpd-2.4.6-17.el7.x86_64.rpm
# rpm -qi httpd
# rpm -ql httpd
# rpm -qc httpd
# rpm -qf /etc/httpd/conf/httpd.conf
# rpm -i httpd-2.4.6-17.el7.x86_64.rpm || echo no
# mv /etc/httpd/conf/httpd.conf .
# rpm -ivh httpd-2.4.6-17.el7.x86_64.rpm --force
# ls /etc/httpd/conf/httpd.conf
# rpm -ivh http://c/content/rhel7.0/x86_64/errata/Packages/kernel-3.10.0-123.1.2.el7.x86_64.rpm
yum
# yum repolist
# cat /etc/yum.repos.d/rhel_dvd.repo
# rm -rf /etc/yum.repos.d/rhel_dvd.repo
# yum repolist
# yum -y install autofs || echo no
# yum-config-manager -h
# yum-config-manager --add-repo=http://c/content/rhel7.0/x86_64/dvd/
## yum-config-manager --add-repo=ftp://c
## yum-config-manager --add-repo=file:///media
# yum repolist
# cat /etc/yum.repos.d/c_content_rhel7.0_x86_64_dvd_.repo
# yum -y install autofs || echo no
# rpm --import http://c/content/rhel7.0/x86_64/dvd/RPM-GPG-KEY-redhat-release
# yum -y install autofs
14. filesystem
# lsblk
# blkid
# mount
# df
# df -h
mount
# lsblk
# mkdir /mnt/hd
# mount /dev/vda1 /mnt/hd
# ls /mnt/hd
# blkid
# mkdir /mnt/uu
# mount UUID="9bf6b9f7-92ad-441b-848e-0257cbb883d1" /mnt/uu
# ls /mnt/uu
# findmnt
# findmnt /mnt/hd
# findmnt /mnt/uu
# umount /mnt/uu
# umount /mnt/hd
# findmnt /mnt/uu
# findmnt /mnt/hd
du
# du
# du -s
# du -sh
ln
# ls -lih
# du -sh /root
# ln httpd-2.4.6-17.el7.x86_64.rpm hd
# ls -lih
# du -sh /root
# ln -s httpd-2.4.6-17.el7.x86_64.rpm sf
# du -sh /root
# ls -lih
locate
# locate fstab
# locate hd | grep /root || echo no
# updatedb
# locate hd | grep /root
find
# find / -name hd
# find / -user student
# find / -user student -exec cp -a {} /tmp \;
# ls -l /tmp/
15. kvm
virsh
kiosk | root | |
---|---|---|
1 | $ rht-vmctl status all | # virsh list --all |
2 | $ rht-vmctl start classroom | # virsh start desktop |
3 | $ rht-vmctl poweroff classroom | # virsh destroy desktop |
4 | $ rht-vmctl viewer classroom | # virt-viewer desktop |
5 | - | # virsh console desktop |
virt-manager
[foundation0]
# virt-manager
- http://c/content/rhel7.0/x86_64/dvd/
- 52:54:00:00:00:0b
Append
Shortcut. shell
Id Key Function Comments 1 Ctrl+A head 光标跳到行首 2 Ctrl+E end 光标跳到行尾 3 Ctrl+ ← \leftarrow ← 光标跳到上一个单词 4 Ctrl+ → \rightarrow → 光标跳到下一下单词 5 Ctrl+U undo 删除光标前所有字母 6 Ctrl+K kill 删除光标后所有字母 7 Ctrl+W word 删除光标前一个单词 8 Alt+D word 删除光标后一个单词 9 Ctrl+C cancel 终止 10 Ctrl+D done 完成 11 Ctrl+S Stop 停止 12 Ctrl+Q Quit 退出停止 13 Ctrl+L clear 清屏 14 Esc.|Alt+. 自动粘贴上条一命令最后一个参数 15 mouse select 复制 16 mouse middle click 粘贴
Shortcut. Terminal
ID Key Function 1 Ctrl+Shift+T Open Tab 2 Alt+1, Alt+2, … Switch Tab 3 Ctrl++ | Ctrl+Shift+= Zoom In 4 Ctrl+- Zoom Out 5 Ctrl+0 Normal Size 6 Win+ ↑ \uparrow ↑ Max 7 Win+ ← \leftarrow ← Half 8 Win+ → \rightarrow → Halt
Shortcut. gnome
Linux | Windows | |
---|---|---|
1 | Alt+F1 | Win |
2 | Alt+F1 | Win+R |
3 | Ctrl+Alt+ ↓ \downarrow ↓ | Ctrl+Win+$ \rightarrow $ |
4 | Ctrl+Alt+ ↑ \uparrow ↑ | Ctrl+Win+$ \leftarrow $ |