0001
Modify the host name
Vi / etc / sysconfig / network, modify Hostname first behavior hostname = host name, can also take effect after restart
0002
RET HAT Linux boot to the text interface (not starting xwindow)
The / etc / inittab ID: 5: InitDefault: 5 in a row is changed to 3
0003
Redhat's automatic upgrade update problem (HUTUWORM)
Find patch at www.redhat.com/corp/support/errata/, 6.1 later with a tool Up2date, it can measure which RPM packets need to be upgraded, then automatically download and complete the installation from Redhat's site.
Upgrade RPM: Up2date -u outside KERNEL: Up2date -u
Upgrade RPM: Up2date -u -f in Kernel: Up2date -u -f
0004
WINDOWS under the Linux partition software
Paragon.ext2fs.Anywhere.2.5.rar and explore2fs-1.00-pre4.zip
0005 0005
MOUNT usage (Sakulagi)
FAT32 partition mount -o codepage = 936, octharset = cp936 / dev / hda7 / mnt / cdrom
NTFS partition mount -o iocharset = cp936 / dev / hda7 / mnt / cdrom
ISO file mount -o loop /abc.iso / mnt / cdrom
Floppy disk mount / dev / fd0 / mnt / floppy
USB flash Mount / dev / sda1 / mnt / cdrom
All / etc / fstab content mount -a
You can specify the file format "-t format", the format can be VFAT, EXT2, EXT3, etc.
0006
FAT partitions using local hard drives in VMware's Linux
Share your local FAT partition and then use SMBFS hanging in VMware. You can put the following line to / etc / fstab:
// Win_IP / D $ / MNT / D SMBFS DEFAULTS, AUTO, UserName = Win_Name, Password = Win_Pass, CodePage = 936, IOCHAREST = GB2312 0 0
Where Win_IP is your Windows IP address;
D $ is a shared name of the D disk shared in your Windows;
/ MNT / D is the directory of the partition mount to Linux;
Win_Name and Win_Pass are users in your Windows to read the partition, such as your administrator name and password.
If you run /etc/rc.d/init.d/netfs, you will automatically mount this partition when starting.
0007.a 0007.A
Delete files named -A
Rm ./-a
RM - -A tells RM This is the last option, see getopt
LS -I lists Inum, then use Find. -inum Inum_OF_THISFILE -EXEC RM '{}' /;
0007.b
Delete files named / A
RM // a
0007.c 0007.c
Delete the / and '/ 0' files
These characters are characters that are not allowed by the normal file system, but may be generated in the file name, such as the NFS file system under UNIX is used on the Mac system.
1. Solve the method, remove the NFS file system to delete files with a special file name under the system that is not filtered '/' characters.
2. Also, remove the other files of the error file name, LS -ID displays the inum, umount file system containing the file directory,
CLRI Clears the directory of Inum, FSCK, Mount, Check your Lost Found, rename the file in it. It is best to remove any file names with the Windows FTP!
0007.d
Delete files with invisible characters
List the file name and dump to file: ls -l> aaa
Then edit the contents of the file join the RM command to make its content into the format of the above file:
VI AAA
[rm -r *******
]
Plus the file with the execution permission CHMOD X AAA
Execute $ AAA
0007.e
Delete files with file size zero
Rm -i `find ./ -size 0`
Find ./ -size 0 -exec rm {} /;
Find ./ -size | xargs rm -f & very valid
For file in * # ourselves define file types that need to be deleted
DO
IF [! -s $ {file}]
THEN
RM $ {file}
Echo "RM $ File Success!"
Fi
DONE
0008
Redhat Set Roller Mouse (MC1011)
After entering X, select the configuration of the mouse, select Wheel Mouse (PS / 2),
If the mouse is abnormal, restart your computer.
0009
Mack xwindow
Start with Linux CD, select Upgrade, then select the package separately, install it.
0010
Delete Linux partitions
Do a PARTITION MAGIC launch floppy disk, delete it after startup. Or start with the Win2000 boot CD and then delete.
0011
How to quit Man
Qi
0012
Do not compile the kernel, Mount NTFS partition
Original RH8, not upgraded or compiled kernel
1. Search on Google.com and download kernel-NTFS-2.4.18-14.i686.rpm
2. rpm -ivh kernel-NTFS-2.4.18-14.i686.rpm
3. MKDIR / MNT / C
4. Mount -T NTFS / DEV / HDA1 / MNT / C
0013
Using XMMS in Redhat 8.0 MP3
Download www.gurulabs.com/files/xmms-mp3-1.2.7-13.p.i386.rpm
RPM -UVH XMMS-MP3-1.2.7-13.p.i386.rpm
0014
Retrieve the forgotten root password (Lilo / Grub)
Three ways:
1. Go to the single user status in the system, change directly with Passwd root
2. Use the installation CD boot system to carry out the Linux Rescue state, the original / partition mount, the data is as follows:
CD / MNT
Mkdir HD
Mount -T Auto / DEV / HDAX (partition number where the original / partition is located) HD
CD HD
Chroot ./
Passwd root
This can be done
3. Take the hard disk of this unit and hang it on other Linux systems. The way is used as the second
RH8
One. LILO
1. Type Linux Single when LILO: Tips
Screen display LILO: Linux Single
2. Enter to enter the Linux command line directly
3. #vi / etc / shadow
Put the first line, that is, the ROOT: after ROOT: and next: The front content is deleted,
The first line will be similar to
root :: ......
save
4. #Reboot restart, the root password is empty
Two. GRUB
1. When the GRUB screen appears, use the top button to select the one you usually start "Don't choose DOS 哟), then press E-key 2. Use the top button to select the one you usually start Linux (similar to kernel) /BOOT/VMLINUZ-2.4.18-14 RO root = label = /), then press E key
3. Modify the command line you see now, join Single, as follows:
Kernel /Boot/vmlinuz-2.4.18-14 Single Ro root = label = /
4. Enter back, then press B to start, you can directly enter the Linux command line
5. #vi / etc / shadow
Put the first line, that is, the ROOT: after ROOT: and next: The front content is deleted,
The first line will be similar to
root :: ......
save
6. #Reboot restart, the root password is empty
0015
Failure Ctrl Alt DEL
Vi / etc / inittab
Comment Ca :: ctrlatdder: / sbin / shutdown -t3 -r now, you can
0016
How to see the version of the redhat is 7 or 8 (hutueworm)
CAT / PROC / VERSION or CAT / etc / redhat-release or cat / etc / ousseue
0017
Which file is in which rpm is in this?
Search on www.rpmfind.net, or RPM -QF file name
0018
Delicate the information of Man or INFO as a text file
Take TCSH as an example:
MAN TCSH | col -b> tcsh.txt
Info TCSH -O TCSH.TXT -S
0019
Use the existing two files to generate a new file
1. Remove the pane of two files (repeated rows, reserved a copy)
2. Remove the intersection of two files (only the files existing in both files)
3. Delete the intersection, leave other lines
Cat file1 file2 | sort | UNIQ
2. Cat file1 file2 | sort | UNIQ -D
3. Cat file1 file2 | sort | uniq -u
0020
Set up COM1, let the super terminal login through the COM1 port
Confirm with / sbin / agharge, edit / etc / inittab, add
7: 2345: Respawn: / sbin / agharge / dev / ttys0 9600
9600bps is because the lack of router is generally this rate, or it can be formed.
19200, 38400, 57600, 115200
Modify / etc / securetty, add a line: TTYS0, make sure the root user can log in
Restart the machine, you can unplug the mouse keyboard display (it is best to look at the output information when starting)
0021
Delete directory all files include subdirectory
RM -RF directory name
0022
View system information
CAT / Proc / CPUInfo - CPU (I.E. Vendor, MHz, Flags Like MMX)
CAT / Proc / Interrupts - Interrupt
CAT / Proc / Ioports - Device IO Port
CAT / Proc / Meminfo - Memory Information (I.E. MEM Used, Free, Swap Size)
CAT / Proc / Partitions - All partitions of all devices
CAT / PROC / PCI - Information of PCI Equipment
CAT / Proc / Swaps - Information on all SWAP partitions
CAT / Proc / Version - Linux version is equivalent to uname -R
UNAME -A - See the system kernel and other information
0023
Remove the extra carriage return SED 'S / ^ m //' test.sh> back.sh, pay attention to ^ m is getting the ctrl_v ctrl-m
Or dos2Unix filename
0024
Switch X Desktop (LNX3000)
SwitchDesk KDE or SwitchDesk Gnome
0025
Universal sound card driver (LNX3000)
Os www.opensound.com/ alsa www.alsa-project.org/
0026
Change Redhat's system language / character set (BEMING / MC1011)
Modify / etc / sysconfig / i18n file, such as
Lang = "en_us", xwindow will display the English interface,
Lang = "en_cn.gb18030", XWindow will display the Chinese interface.
There is also a method
CP / ETC / SYSCONFIG / I18N $ HOME / .I18N
Modify $ home / .i18n file, such as
Lang = "en_us", xwindow will display the English interface,
Lang = "en_cn.gb18030", XWindow will display the Chinese interface.
This will change the individual's interface language without affecting other users.
0027
Set the screen to 90 columns
Stty cols 90
0028
Use MD5SUM files
MD5SUM ISOFILE> HASHFILE, the MD5SUM file is compared with the Hashfile file content comparison, verification
Whether it is consistent MD5SUM -C Hashfile
0029
Unzip multiple ZIP files at a time
Unzip "*", pay attention to quotation marks less
0030
Look at the PDF file
Use XPDF or install Acrobat Reader for Linux
0031
Find the file for the right limit
Find. -type f / (-perm -04000 -o -perm -02000 /) -exec ls -lg {} /;
0032
Install Chinese input method
Take RedHat8 as an example, xwindow and its terminal don't have to say it, the default is installed, exhaled with Ctrl-Space.
Now discuss pure console, please download zhcon.gnuchina.org/download/src/encha-0.2.1.tar.gz,
In either directory, TAR XVFZ ENCON-0.2.1.tar.gz, CD ENCON-0.2.1, ./configure,
Make, make install. End of installation, want to use, run zhcon, want to exit, run the exit.
0033
Receive the pop-up CD (Beike)
#eject -t
0034
CD CD made of ISO file (mentally wisdom)
Cp / dev / cdrom xxxx.iso
0035
Quickly watch the boot hardware detection (mentally wisdom)
Dmesg | More
0036
View hard drives
DF -K is displayed in K
DF -H is displayed in humanized units, which can be B, K, M, G, T..
0037
View the size of the directory
du -sh dirname
-S only shows total
-H is in units of k, m, g, and improve information readability. KB, MB, GB is a converter unit at 1024, and -H is converted at 1000.
0038
Find or delete the process (WWWZC) that is using a file (WWWZC)
Fuser filename
Fuser -k filename
0039
install software
RPM -IVH aAA.RPM
TAR XVFZ AAA.TAR.GZ; CD AAA ;./configure; make; Make Install
0040
Set / delete environment variables in character mode
Setting up: Export variable name = variable value
Delete: unset variable name
under CSH
Setting: STENV variable name variable
Delete: UNSETENV Variable Name
0041
How is LS to see. The beginning of the file
LS -A
0042
Where is the file in the RPM?
RPM -QPL AAA.RPM
0043
Use src.rpm
Rpmbuild --rebuild * .src.rpm
0044
Color or no color display in Vim
Vi ~ / .vimrc; If there is Syntax on, the color, Syntax Off, no color is displayed
0045
Linux is a real-time or time-only operating system
Minute
0046
What is the meaning of make bzimage -j? WIND521
-j is mainly used when your system hardware resources are relatively large, use this speed to speed up compilation, such as -J 3
0047
How did the source package?
You don't install the source code, you can see your source code on your CD on rpm -i * kernel * source * .rpm.
0048
Modify system time
Date -s "2003-04-14 CST", CST referral time, time setting DATE -S 18:10
0049
Power on the partition under Windows on Mount
Automatically hang the Windows D disk on / mnt / d, open / etc / fstab with VI, add the following line
/ dev / hda5 / mnt / d vfat defaults, codepage = 936, ocharset = cp936 0 0
Note that first, one / mnt / d directory is created.
0050
Linux how to use so many memory
In order to improve system performance and non-waste memory, Linux makes multiple memory Cache to increase IO speed.
0051
What is the last two numbers in the last configuration item in the FSTAB (LNX3000)
The first called FS_FREQ, used to determine which file system needs to perform DUMP operation, 0 is not required;
The second name is fs_passno, which is the sequence number of the FSCK program to detect the disk when the system is restarted.
1 is the root file system, 2 is another file system. FSCK Detects the disk according to the serial number, 0 indicates that the file system is not detected.
Dump executes the backup operation of the file system for EXT2
FSCK detection and repair file system
0052
Linux allows users to have a certain length and comply with complexity (EAPASS)
Vi /etc/login.defs, change Pass_min_len
0053
Translation software in Linux
Star translation king xdict
0054
Do not let the display sleep
Setterm -blank 0
Setterm -blank n (n is waiting time)
0055
Use DAT to query yesterday's date (gadfly)
Date --Date = 'Yesterday'
0056
How to screen capture under xwindow
KSNAPSHOT or GIMP
0057
Unzipped small
TAR XVFJ EXAMPLE.TAR.BZ2
TAR XVFZ EXAMPLE.TAR.GZ
TAR XVFZ EXAMPLE.TGZ
TAR XVF EXAMPLE.TAR
Unzip eXample.zip
0058
Find ways to find a file in the multi-level directory (Qinghai Lake)
Find / dir -name filename.ext
Du -a | grep filename.ext
Locate FileName.ext
0059
Do not let ordinary users change their own password (MyXFC)
[root @ xin_fc etc] # chmod 511 / usr / bin / passwd
I want to make ordinary users to change your password yourself.
[root @ xin_fc etc] # chmod 4511 / usr / bin / passwd0060
What should I do if the graphics card is unable to do (Win_BIGBOY)
Go to http://www.redflag-linux.com/, you can install the XFree86 4.3 installation.
0061
Super delete formatting tool (mentally wisdom)
To build a deleted formatted gadget than pqmagic: sfdisk.exe for msdos
http://www.wuseuang.net/soft/sfdisk.zip
0062
How to make the correct Chinese in the XMMS playlist (MyXFC)
- * - * - * - * - * - ISO8859-1, -MISC-SIMSUN-Medium-R-NORMAL - 12 - * - * - * - * - * - GBK-0, * - R-
Complete this thing completely to your font
Operation method:
Right click anywhere in the XMMS playing tool
Will see an "option" and select "Fonts" to select "Fonts"
Then copy the above font to "playlist" and "User X FONT)
0063
Learning MP3 (Hehhb) under Linux
Redhat CD, the XMMS cannot play MP3 (silent), to download and install an RPM package: XMMS-MP3-1.2.7-13.p.i386.rpm installation can be installed. Open XMMS, CTL-P, in the Font column
First tick in the upper half of the small frame, then select "Fixed (MISC) GBK-0 13"
I can display the Chinese song song name. Select "Open Audio System Driver in Audio Output Plugin
Program 1.2.7 [lioss.so] can play the MP3 file normally.
0064
Install Chinese font (HEHHB)
First download http://freshair.netchchina.com.cn/~george/sm.sh
(Reference: http://www.linuxeden.com/edu/doctext.php?docid=2679)
SIMSUN18030.TTC can be downloaded in Microsoft website, http://www.microsoft.com/china/windows2000/downloads/18
030.asp It is an MSI file, installed in Mswindows, installed in the Fonts under the Windows directory
It can be found in the catalog. Take SIMSun.ttc, Simsun18030.ttc, Tahoma.ttf, Tahomabd.ttf
Copy to / usr / local / temp, then download the shell files in this directory, then open the terminal
CD / USR / local / TEMP
CHMOD 755 sm.sh
./sm.sh
0065
Fat32, FAT16 file system loaded with Windows partition (Hehhb)
Enter KDE as root, click on the "Starting point" icon on the desktop, establish the following folders: C, D, E, F, G, USB in / mnt directory. It is used as the partition and USB flash drives under Windows.
Use the text editor to open the / etc / fstab file. Add it as follows:
/ dev / hda1 / mnt / c vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0
/ dev / hda5 / mnt / d vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0
/ dev / hda6 / mnt / e vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0
/ dev / hda7 / mnt / f vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0
/ dev / hda8 / mnt / g vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0 / dev / cdrom / mnt / cdrom udf, ISO9660 NOAUTO, IOCHARSET = GB2312, Owner, Kudzu, RO 0 0
/ dev / sda1 / mnt / usb vfat ocharset = GB2312, umask = 0, CODEPAGE = 936 0 0
The deployment is exit. After restarting, you can access the FAT32 or FAT16 format partition to solve the display of the Windows partition and the disc Chinese file name garbled.
Question. A total of six columns, each column is used for a Tab key. Note that this method can only mount on the FAT partition format. SDA1 is a flash drive.
0066
Use five and pinyin, location input method (HMKART) in X
From http://www.fcitx.org/, upload the FCITX RPM package installation
0067
How to extract the RAR file (HMKART) under Linux
http://www.linuxeden.com/download/softdetail.php?soft=883
Download Rar for Linux 3.2.0, decompression, Make
You can then use unrar e youfilename.rar to extract the RAR file
0068
How to add / remove the RPM package after the hard disk is installed (Sakulagi)
RedHat-config-packages --iseodir =
Can specify the directory where the ISO file is located
0069
Control volume under characters (GRUB007)
AUMIX
0070
Make ISO with DD (GRUB007)
DD if = / dev / cdrom of = / tmp / aaa.iso
0071
Delete all things before a few days (including files in the directory) (SHALLY5)
Find. -ctime 3-EXEC RM-RF {} /;
or
Find ./ -mtime 3 -print | xargs rm -f -r
0072
Where is the user's crontab (HUTUWORM)
/ var / spool / cron / next file named by the username
0073
Run the program as different users
Su - username -c "/ path / to / command"
Sometimes you need to run a special identity, you can let Su come to do
0074
How to empty a file ()
> filename
0075
Why can't I display Chinese under OpenOffice (Allen1970)
Change font settings
Tools-> Options-> font replacement
Andale Sans Ui -> SIMSUN
0076
How to back up Linux system (Purge)
Symantec Ghost 7.5 supplies EXT3 NATIVE replication
0077
Partition Magic (WWWWZC) on Linux
Linux Next useful partition tool: parted
You can modify the partition size, delete / create partitions in real time.
0078
/ PROC / SYS / SEM, every representation, what does it mean? (Sakulagi)
/ Proc / Sys / SEM content is as follows
250 32000 32 128
These 4 parameters are Semmsl in turn (the maximum number of semapons per user), SEMMNS (maximum number of system semantics), SemOPM (number of SemoP system call operands), SemMni (system signal quantity set maximum)
0079
What does BIGMEM SMP UP mean in the GRUB boot menu? (lnx3000)
SMP: Symmetrical multiprocessor mode
BIGMEM: Supports optimized kernels for more than 1G memory
Up: (UNI Processor) Mode of single processor
0080
Why is Oracle installer display garbled? (lnx3000) Now Oracle's installer has problems with Chinese support, you can only use the English interface to install, before performing RunInstaller, execute: export lang = c; export lc_all = c
0081
What is the color of the document and directory under Linux (Sakulagi, mentally wisdom)
Blue represents a directory; green represents executable; red represents a compressed file; light blue
Color represents a link file; gray represents other files; red flashing indicates that the file is problematic; yellow is a device file, including Block, Char, FIFO.
Use Dircolors -P to see the default color settings, including various colors and "bold", underscore, flashing, etc.
0082
Where is the data inventory of mysql?
1. If you use the RPM package installation, you should be named directory with the database name in / var / lib / mysql
2. If the source code is installed in / usr / local / mysql, it should be in / usr / local / mysql / var, named Database named directory name
0083
How to add a hard disk (good gentleman)
First, shutdown, physical connection hard disk
If it is an IDE hard disk, pay attention to the main, slave the plate; if it is a SCSI hard disk, pay attention to selecting an ID number that is not used.
Second, boot, check the hard disk is not detected by Linux
Dmesg | grep hd * (IDE hard drive)
Dmesg | grep sd * (SCSI hard drive)
Or Less / Var / Log / Dmesg
If you don't detect your new hard drive, restart, check the connection, see if the BIOS has recognized it.
Third, partition
You can use fdisk, sfdisk or partned (GNU partition tool, partition magic under Linux)
Fourth, format
MKFS
V. Modify FSTAB
VI / ETC / FSTAB
0084
How to see the volume of the partition under Linux (Q1208C)
E2Label / dev / hdxn, where x = a, b, c, d ...; n = 1, 2, 3 ...
0085
How to add a new language package after installation in RH8, 9 (Mr.)
One. 8.0
Put the first disc
2.CD / MNT / CDROM / RedHat / RPMS
3.RPM-IVH TTFONTS-ZH_CN-2.11-29.NOARCH.RPM (Simplified Chinese, you can use the Tab key to make up the part of the back, so as not to enter incorrectly)
4.RPM-IVH TTFONTS-EN_TW-2.11-15.NOARCH.RPM (Traditional Chinese)
If you still want to weave Japanese, Korean, try the TTFONTS * .RPM on the second CD.
2.9.0
9.0 is not on the first plate, on the third disk. RPM package name is:
TTFONTS-EN_CN-2.12-1.Noarch.rpm (Simplified Chinese)
TTFONTS-ZH_TW-2.11-19.NOARCH.RPM (Traditional Chinese)