LINUX system basic operation

xiaoxiao2021-03-19  201

1. How to improve the input efficiency of the command in BASH? A: In the input state of the command line, in addition to the typed characters you can use, you can use the left, right arrow keys, and delete keys to make the command line editor to improve the command editing. effectiveness. You can use the Tab keys to make the command and file name quick input to command and file names during the input command. Under the Bash's PM Character, you can use the history of the command to trace the command, that is, you can edit or execute the previously entered command. In addition, you can also use the history command to view a list of history. 2. How to log in to the character interface to log in to the Character interface of Linux? Answer: The Linux graphic interface login system run level is 5, the character interface login system run level is 3. Modify the initTab file, change the default run level of the system: Turn ID: 5: initdefault to ID: 3: INitDefault 3. How to Quickly delete non-port directory in Linux? A: The RMDIR command can delete an empty directory. However, for non-empty directories, all files and subdirectories in the directory are required, so you cannot quickly delete non-empty directories in Linux. The RM command Name The corresponding parameters can quickly delete a very directory in Linux. -r parameter, this parameter allows the RM command to delete the entire directory tree (including file name and subdirectory in the directory) -f parameter, the RM command default prompts the user to confirm that all files and directories that will be deleted. "- f" parameter limits the RM command to delete the file without prompting, and you can save the trouble for each file to delete confirmation. (However, it is also more dangerous to delete files) so quickly delete command form in the Linux in the non-empty directory, as follows: # rm -rf anotempdir 4. What are the commands can be used to shut down the system? A: In Linux, multiple files that complete the shutdown system, the side focus of each command is different: the Halt Command HALT command can directly turn off the system and easy to operate. The shutdown command shutdow command can turn off the system according to the different parameters, or you can restart the system, and you can specify the time of the shutdown system. The following command can immediately turn off the system # shutdown -h count command init command to change the current system Level, run level "

0 "

On behalf of the shutdown state, you can turn off the system with the following command; # init 0 5. How to switch between virtual console? Answer: Virtual console in Linux is usually divided into two categories: text console and graphics console. Linux is unified for all virtual console and represents the corresponding buttons, for example: virtual console 1 ~ 6 is usually a text console, using "F

1"

~ "F

6 "

Indica, the virtual console 7 is a graphical console, uses "F7 representation. Switch other console (text or graphic console) from a text console (text or graphic console), you need to use the combination keys Alt Fn where the FN represents the console that needs to be switched from the graph The console is switched to other console, and the combination Ctrl Alt Fn requires the console to switch to the console. 6. How to stop the program process without reactive? A: There are two ways to stop the process number: stop formulation process number The process, stop all processes of the specified program name. Stop the process of the process Ctrl C using the PS command to view the process number to stop using the kill command to stop the process number of the process number for the process that cannot be stopped (no response) Process) You need to use the kill command to add "-9"

parameter. Stop All processes of the specified program name Use the lillall command to stop all processes of the specified program name without querying the process number. The killall command can stop all processes that specify names, such as many of the same names in the system, and users only need to stop one of them, can not use the killall command killall command to use the same available "

-9"

Parameter mandatory stopper runs. 7. Use root users to manage remote login management? A: Linux provides two remote login methods for SSH and Telnet. SSH Remote Login SSH Remote Login Method The encrypted transmission is relatively secure, so allow the root user to log in to the system to remotely manage the Telnet remote login Telnet remote login mode Data (including username and password), So security Poor, so users do not support remote management directly as root. If the user needs to manage the system as root, you need to use a normal user, account Telnet, and then use the su command to transfer the user to root. 8. How to get help under Linux? A: Linux has a variety of ways to provide help information for users 1. Bash internal command helps use the help command to get online help information for Bash's internal commands. 2 . MAN Manual For most commands in Linux, the MAN manual is available online, you can use the man command to query the corresponding help information. 3. Info Information Linux Many packages with INFO help documents, use the info command to view the corresponding help information. 9 . How to use the disc drive in Linux to read files in the disc? A: 1. Confirm that the disc device file in the system is generally "/ dev / cdrom" 2. Select the loading of the disc file system to click on the directory, generally "/ mnt / cdrom" 3. Use the mount command to load the disc to the loading click directory, command as shown below # mount -t lso9660 / dev / cdrom / mnt / cdrom 4. Read the file in the disc, the location of the file is in the loading clicking directory 5. You need to use the umount command to uninstall # umount / mnt / cdrom 10 using the umount command when you do not use the disc. How do you know which RPM package is installed? A: 1. Query commands of commands, when we perform commands in the Linux system, only enter commands and cannot enter the command of the command, so you need to query the command file path corresponding to the command. Use the where is command to query the path of the command file # where is touch touch: /bin/touch/touch/share/man/marl/touch.1 yz 2. Query the software package to which the command file belongs: Use the "rpm-qf" command to query the package belonging to the command file, the rpm command is to parameter to the full path of the command file # rpm -qf / bin / Touch Corentils-4, 5, 3 -19 11. How to determine the type of file? A: 1. Viewing the file suffix in many specific formats in Linux, there is a corresponding file suffix, such as ".tar", "yz "," .rpm ", etc., so you can initially determine the file type by viewing the suffix of the file. 2 . Viewing the directory where the file is located in the directory tree of the Linux system, different types of files are placed in different directories, such as the system command file is placed in the "/" directory in the "/ bin" and "/ sbin" directory. in.

3. Use the file command to determine that the file type file command provides the file type function, which can be identified for file types common to Linux: # file / bin / pwd / bin / pwd: ELF 32-Bit LSB Executable, Intel 80386, Version 1 (Sysv), for gnu / linux2.2.5

, DynamicalLinked (Uses Shared Libs), Stripped 12. What is the floppy disk in Linux? A: 1. In the Linux system, the name of the floppy disk device file is usually "/ dev / fdo". 2. Linux supports multiple file system formats, and both of EXT 2 and FAT formats are usually used on floppy disks. 3. Create a file system (formatted floppy disk) on the floppy disk, according to the different commands, different commands, using different commands, using the mkezfs command to create an EXT 2 file system on the floppy disk: # mkezfs / dev / fdo in floppy disk Establish a FAT file system Using the MKDOSFS command to create a FAT file system on a floppy disk: # MKDOSFS / DEV / FDO 13. How fast conversion directory in Linux? A: Use the CD command in Linux to convert the directory, you can quickly convert directory: 1. The absolute path and the relative path combination // are converted to a subdirectory # cd .. / adir // converted to the root directory # CD / 2. Back to the current user host directory directly using the CD command to switch from any directory to the current user host directory # cd 3. Entering the host directory root user enters any user's host directory, and ordinary users need to have appropriate permissions to // entered the host directory # cd ~ auser 4. Returns the user's last directory any user to use the "CD-" command to return to the user's last directory # CD- 14. How to schedule management? A: 1. Running in Linux runs into a reception running and background running. When executing the program, enter the program name directly, the program will run in the front desk and occupy the current console until the program runs, if you join "&" after the execution command of the program, the program will run in the background, do not occupy the console of the input command, Therefore, the user can do other operations. 2 . The program can transform between the front and the background run state to convert the program between the front run state and the background run state. 3. The holder always runs when the user exits the login, the program executed by the user will stop running, and the program that keeps the running status in the system can use the NOHAP command to work with the execution command of the program. # NOHAP A JOB & Among them, A Job is a program name that needs to remain in the system.

15. Which screen output is saved in Linux? A: You can use the following method to save the screen output of the command 1 in Linux. Redirect screen output to file When using ">" to output the screen output to the specified file when the output command, if there is no existing file, if there is an original content, the file is covered # ls> filist 2. Redirect the screen to output to the file and append the specified file Use ">>" to redirect the screen output to the specified file when execute the command, if there is no existing content, the file will be retained, redirected content Will be added to the end of the document # ls >> file 3. When the output of the command is displayed on the screen and saved to the file to redirect the output to the file, the screen will no longer display the output content. To display the screen output, save the output to the file, you need the execution command Use "|" (pipeline) with the TEE command to use # ls | tee filist 16. What methods in Linux can exit user login? Answer: Users in Linux use the following method to exit the login Ø logout command logout command No need to use the parameters, directly exit the current user login Ø EXIT command EXIT command is the most commonly exit login command, you can use the corresponding parameters as the return value Ø Shortcut Key mode users Command Input Status Use Ctrl D combination keys to exit the current login 17. How to view the hardware and software information for the Linux system? A: "/ proc" is a virtual file system, where many files save system running status and related information For "/ proc" files available file view commands to browse their content, the file contains system specific information: CPUInfo host CPU Information DMA Host DMA Channel Information FileSystems File System Information Interrupts Host Interrupt Information IOPROTS Host I / O Port Number Information Menfo Host Memory Information Version Linux Memory Version Information 18. How do I view the system process in Linux? Answer: Provides a variety of view system processes in Linux Commands PS command ps command to display the current system process command, is the most commonly viewed process method TOP command TOP command to display system process information in the console screen, and continue to monitor, users can monitor real-time The system is running. The PSTEE command PSTEE command displays the number of system processes and process between the process, and the user can clearly understand the inter-process hierarchical relationship.

19. How to determine other login users in the current user's identity and system in Linux? A: 1. Confirm that the current user uses "Whoami" and "WHO AM I" commands to confirm the current user's identity and related information # WHOAMI ROOT # WHO AM I Root PTS / O, JAN 3 05:54 (192.168.111) 2. The login user in the system uses "W" and "who" commands to learn all user information for logging in to the current system 10: 02: N up16: 02, i users, load average: 0.00, 0.00, 0.00 user Tty from Loging ID JCPU PCPU WHAT PTT PTS / O 192.168.1.111 5:54 AM 0.00S 1.055 0.02S W User1 PTS / I 192.168.1.113 10:02 AM 11.00S 0.155 0.15s -bash 20. How to analyze system login in the system login according to the following /var/log/boot.log file? # 0 g 2 w j j j 2 2 j j 0 j 0 0 0 0 0 0 0 0 0 0 2 0 2 0 0 0 0 0 RHL9 CROND: CROND SUCCEDEDED A: The log file in the Linux system is placed in the directory "/ var / log" directory, "/ var / log / boot.log" file records the status information of each process when the system login is logged in. JAN 2 01:05:03 RHL9 WEBMIN Process by / USR / LIBEXEC / Webmin program suspension Jan 2 01:05:06 RHL9 Host xinetd processes Successfully stop Jan 2 01:05:07 RHL9 host Crond process is successfully suspended 21 What is installed in .red hat linux9? A: The installation of Red Hat Linux9 is very flexible, and multiple ways can be used and installed 1. The installer boot mode installer can boot from the floppy disk, the optical disc, or can be booted by OSB. The installation of the installation medium can be installed by a plurality of installation media read packages. Such as local hard drives, discs, and networks, where NFS, HTTP, and FTP multiple network protocol support are read from the network media. 3. The installation configuration mode The installer can be configured manually or automatically installed by reading. twenty two . Support for ISO files in Linux? A: 1. Supports access to the FAT, FAT32 partition in Windows in Linux9, without supporting the NTFS partition format of Windows2000. twenty three . Do you need to prepare before installing Linux? A: 2. It is best to determine Linux to support the partition type before using a Windows partition (using the fdisk command) 24. How to use the contents of the Windows partition in Linux? A:

转载请注明原文地址:https://www.9cbs.com/read-130038.html

New Post(0)