general, the terminal we use is set by the login or Getty program and may not conform to our custom.For unused terminals, may be unfamiliar, not accustomed to command output style, interactive slightly difficult. Therefore, the general user will set the terminal to the following type:$TERM =vt100$VT100 is the abbreviation for virtual terminate 100 . Virtual terminal is a kind of fake terminal, the terminal
:00 grep largefile2[[email protected] build]#Screen scene:We already know how to keep the process free of HUP signals, but if there are a lot of such commands that need to be run in a stable background, how do you avoid doing this for every command?Workaround:The most convenient way to do this is screen. Simply put, screen provides the ansi/vt100 terminal emulator, which enables it to run multiple full screens of pseudo-terminals under a real terminal
provides the ansi/vt100 terminal emulator, which enables it to run multiple full screens of pseudo-terminals under a real terminal. Screen has a lot of parameters and is very powerful, so we'll just describe its common functions and briefly analyze why using screen can avoid the effects of HUP signals. Let's take a look at screen's help information:Screen (1) screens (1) NAME Screen-scre
in a stable background, how do you avoid doing this for every command?Workaround:The most convenient way to do this is screen. Simply put, screen provides the ansi/vt100 terminal emulator, which enables it to run multiple full screens of pseudo-terminals under a real terminal. Screen has a lot of parameters and is very powerful, so we'll just describe its common functions and briefly analyze why using screen can avoid the effects of HUP signals. Let'
configuration, refer to "Tips: how to configure MODEM in LINUX ". It is also assumed that it is now set to automatically intercept external calls.
1. Add the following two lines to the/etc/inittab file:
S0: 345: respawn:/sbin/mgetty-a-m "" ATS0 = 1 OK-D-x 3 ttyS0 vt100
S1: 345: respawn:/sbin/mgetty-a-m "" ATS0 = 1 OK-D-x 3 ttyS1 vt100
Parameter description:
Id: runlevel: action:/sbin/mgetty [options]
= program to run: Sysinit:/etc/rc. d/rc. sysinit: Respawn:/root/Logger: Respawn:/root/Watchdog: Once:/root/run_dv2.sh# Namkyu.kim@cecwireless.com.cn# Do we have to wait here?#: Wait:/etc/rc. d/RC 3# What to do when CTRL-ALT-DEL is pressed.: Ctrlaltdel:/sbin/poweroff# What to do before system shutdownNull: shutdown:/bin/shutdown. Sh# What to do before power is cut (post init)Null: postinit:/bin/postinit. Sh#: Respawn:/sbin/Getty-l ttys1 38400 VT100#:
command in the background when submitting the command, you can use CTRL-z and "bg" to put it in the background, and then use "disown ")
[root@pvcent107 build]# cp -r testLargeFile largeFile2[1]+ Stopped cp -i -r testLargeFile largeFile2[root@pvcent107 build]# bg %1[1]+ cp -i -r testLargeFile largeFile2 [root@pvcent107 build]# jobs[1]+ Running cp -i -r testLargeFile largeFile2 [root@pvcent107 build]# disown -h %1[root@pvcent107 build]# ps -ef |grep largeFile2roo
testlargefile largefile2 [root @ pvcent107 build] # disown-H % 1 [root @ pvcent107 build] # ps-Ef | grep largefile2root 5790 5577 1 00:00:00 pts/3 00:00:00 CP-I-r testlargefile largefile2root 5824 5577 0 pts/3 grep largefile2 [root @ pvcent107 build] #
Screen
Scenario:
We already know how to protect the process from the HUP signal. But if a large number of such commands need to be run in a stable background, how can we avoid such operations on each command?
Solution:
screen
access the remote account. For more information, see the kvalid_user function.
Example
In the following example, if you enter the tn command instead of the AIX telnet command, the command prompt is displayed as tn>.
To log on to the remote host host1 and perform terminal negotiation, enter:
Telnet host1 to log on to host1 as the terminal vt100 without terminal type negotiation), select one of the following methods:
Run the following command to set th
sh-# ExportExport console= "/dev/console"Export Home= "/"Export Ld_library_path= "..."Export OLDPWDExport path= "/bin:/usr/bin:/sbin:/usrbin"Export prevlevel= "N"Export pwd= "/"Export runlevel= "4"Export shlvl= "3"Export term= "VT100"Export terminfo= "/usr/share/terminfo"sh-# The Export command is the shell builtin command.sh-# Type ExportExport is a shell builtin Environment variables set using the Export command will only take effect in the curren
1, the term indicates that terminal VT100 is a simple terminal modeExport term=vt100In this mode, the arrow keys are invalid, with the letter keyThere are many environment variables, PATH, PS1, termGenerally on the screen is temporary, only write it to/etc/profile under the permanent effect. (Export term=vt100)2. Enter single user mode, set terminal, change file location to/a below. When you're done modifyi
1 term environment variable not set.Docker Exec-it/bin/bash goes in to execute clear,top, and the command appears environment variable not set.That is, the environment variable is not set, the source/root/.bash_profile does not make it necessary to define term variablesTerm=linuxExport term or export TERM=VT100 environment variable term is set to terminal, here the vt100,vt220 and so on is to explain the si
@ pvcent107 build] # disown-h % 1 [root @ pvcent107 build] # ps-ef | grep largeFile2 root 5790 5577 1 00:00:00 pts/3 00:00:00 cp-I-r testLargeFile largeFile2 root 5824 5577 0 pts/3 grep largeFile2 [root @ pvcent107 build] #
ScreenScenario:We already know how to protect the process from the HUP signal. But if a large number of such commands need to be run in a stable background, how can we avoid such operations on each command?Solution:The most convenient method is screen. Simply put, screen pro
(Protocols. In Unix, everything is a file, and the same is true for terminal devices. Reading Terminal devices is to get user input, while writing to terminal devices is to output.
It should be noted that Microsoft's DOS and Windows seldom use the concept of terminal, because these systems appear on machines with their own keyboard and display. These systems prefer to directly manage the keyboard and display (handle the keyboard controller and directly write the video memory), rather than using
]#Flexible use of ctrl-zIn our daily work, we can use the ctrl-z to suspend the current process to a background pause, perform some other action, and then use FG to back up the suspended process to the foreground (or BG to put the pending process in the background) to continue running. This allows us to flexibly switch between running multiple tasks within one terminal, which is especially useful when debugging code. Since the code editor is suspended to the background and then re-placed back, t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.