1 The Terminal
1.1 tty and virtual tty’s
- tty:TeleTYpewriter(老式的打字机)
- 当计算机启动,7个tty被加载,前6个是命令行,第7个是X-session
- 使用
Ctrl-Alt-F#
切换 - 还有
virtual tty
虚拟的tty
1.2 Login from tty to shell
2 Job Control and Sharing a Terminal
2.1 Terminating and Stopping a Job
ctrl + c
发送SIGINT
信号 中断进程(安全退出)ctrl +z
发送SIGSTOP
信号 后台,并阻塞进程
2.2 Continue a Job in the foreground and background
操作 | 描述 |
---|---|
cmd & | execute a job in the background |
Ctrl-Z | stop a currently running job |
bg | continue the last stopped command in the backgorund |
bg %i | continue job number i in the background, |
fg | bring the last job from the background to the foreground |
fg %i | brint job number i from the background to the foreground |
jobs | list the current jobs, stoped and running |