Linux system management skills big

  

As a desktop operating system, Linux human-machine interface can not be flattered, but as a network operating system, its ease of use (for NOS) and high performance is probably difficult There is something that can be right. Of course, this is not to say that its operation is very simple, but that if you can master some skills, both system settings and network management can be easily and freely.
Preventing automatic display of power in terminal mode
After installing Linux on most PCs, it can also automatically turn off the display in terminal mode, but if we want to display some information on the display, such as: network This feature becomes very annoying for traffic, packet analysis, and more. The modification of CMOS and system properties can not be solved. The solution is to set the terminal command, such as setterm--blank, to turn off the automatic energy saving feature.
Save the man help file as a normal txt file
The status of Man is very important in Linux, much better than the help in Windows. But the information it displays is not plain text. If you redirect the text directly to a text file, you will find that the text highlighted in man becomes two, and there are countless tabulations. This makes our printing and editing very inconvenient. However, you can get the normal help text of the tcsh command using the following statement: mantcshcol-b> tcsh.txt, and there will be no more repetitive characters.
IDE hard disk optimization
Linux may pay more attention to data security rather than performance, which is absolutely necessary for NOS, but there are no harm in opening some useful optimizations of IDE hard disk. Take a look at this command: hdparm, which is used to display and set the parameters of the hard disk (including the CD-ROM drive). We can first use hdparm-i/dev/hda to view the parameter settings of hda hard disk, and then modify according to the situation, such as: hdparm-c1 can change the I/O read/write support of the hard disk from 16 bits to 32 bits, hdparm -m16 is the MultiCount that turns on the hard disk. It is best to use the -i parameter to determine the maximum number of MultiCounts your hard drive can support before executing this command. The main optimization is these two, and the other ones are not sure and don't mess. You can use hdparm-t/dev/had to test hard drive performance before and after optimization.
Allow root to log in remotely
The default security setting for Linux is that root can't log in from a remote workstation, which makes us have a lot of trouble managing the Linux server remotely. /etc/securtty is controlling this mechanism. For the key files, add the pts/0, pts/1, etc. to the root section of this configuration file.
Recovering the Linux bootloader LILO of the overwritten MBR (master boot sector) If LILO is installed in the MBR, then install Linux and then install Windows, LILO will be overwritten, then we will not be able to boot from the hard disk. Linux, what should I do? We can boot into the Windows command line mode, copy the two files loadlin.exe and vmlinuz from the Linux CD to the Windows partition, and then execute loadlinvmlinuzroot=/dev/had? Rw. The purpose of this command is to start Linux from the specified partition and set the root partition (1) to read-write mode, so that you can modify most of Linux settings or restore LILO. It should be noted that the Linux booted in this case is not complete, such as: MSDOS, VFAT file system support, network, etc. can not be used, but it does not matter, as long as it can be started, we can use mkbootdisk to create a Linux boot disk, use this Starting the Linux boot disk, you can use Linux completely. After starting Linux, just put the first item in the /etc/lilo.conf file boot=/dev/hda? Change to boot=/dev/hda, then execute lilo to resume booting Linux from MBR. Configuration file list file location and name role /etc/rc.d/rc.sysinit?? Public service configuration at system startup /etc/rc.d/rc.local Local service configuration at system startup /etc/bashrc, /Common configuration of etc/profilebashshell /home/username/.bashrc private bashshell configuration /etc/securetty terminal security settings /etc/hosts hostname and ip address corresponding file /etc/resolv.confdns server configuration /etc/squid. Conf or /etc/squid/squid.confsquid proxy server software configuration /etc/smb.conf or /etc/samba/smb.conf based on smb network neighborhood configuration /etc/dhcpd.conflinux dhcp server configuration file /etc/Filesystems support file system list /etc/fstab The current system has activated partition information /etc/host.conf specified system search dns record configuration file /etc/lilo.conf startup program lilo configuration file
Linux system Most of the control is based on configuration files, and understanding these configuration files is more conducive to using Linux.
Adding Linux to the WinNT/2000 boot menu
Linux boot menu is good, but unfortunately can't display Chinese, and you can't choose to start NT or Win98, so I think it is better to use the NT series. In fact, it is very simple to do, install Linux after installing all Windows series operating systems, and choose to install LILO to the partition where Linux is located instead of MBR during installation, then start Linux with boot disk and mount Windows partition to /mnt/Dos; then execute ddif=/dev/hda? Bs=512count=1of=/mnt/dos/bootsect.lin, so there is a bootsect.lin file in the Windows partition, which records the boot information of the Linux partition, and then adds C to the startup configuration file boot.ini of Windows NT. :BOOTSECT.LIN="Red Hat Linux7.0", when I started the computer, we found that there is more "Red Hat Linux7.0" in the Windows NT boot menu, and you can start our Linux by selecting it. It should be noted that NT still only recognizes files in 8.3 format at startup, so do not change bootsect.lin to a long file name.
Using Squid to Control File Type Access
One of the great advantages of Linux is that it is very convenient to route IP networks. Many Linux systems are specifically used as Internet access routers. However, packet filtering software such as iptables or ipchain can only control which sites a user visits, and cannot control which files a user accesses. This can be easily done using the proxy server software Squid under Linux. The urlpath_regex entry in the Squid.conf file controls access to each registered MIME file, such as the following statement:
# gives the need to control access MIME file type (access control list is acl)
acldenymineurlpath_regex.exe.zip
#Forbid access to such files
http_accessdenydenymine
This bans all users after this statement from ziping the corresponding site , exe file access, of course you can add other file types, such as MP3. Then use the ReDirect redirection function such as iptables to force users to access the Internet through the Squid proxy. The so-called "transparent proxy" can completely control the user's access to the site.
Let the system use the default color file display
The color display of different types of files under Linux terminal makes us feel very convenient, but sometimes you may accidentally lose this function, add aliasls="ls to the configuration file --color-F-N" can guarantee the normal use of this feature.
Use cron to keep the activation status of some partitions
cron is equivalent to the scheduled task of Win98, it can execute certain commands according to the requirements of users. If you mount some NTFS partitions and frequently access this partition (such as WebServer access to some files), it is very likely that you can't read and write data correctly because of the long time. You can use cron's timed access function to ensure the partition. Always activated. According to personal experience, the NTFS partition on the network is best to let cron access once every 15 minutes, otherwise there may be a mount failure when the partition data is needed.

Copyright © Windows knowledge All Rights Reserved