Q reproduced wonderful word linux
Advertisements
Was wonderful, Mo Kanwan, backup collection
- Network independent papers --------------------------
1001 to modify the hostname (Chen Xu)
vi / etc / sysconfig / network, modify the HOSTNAME an act "HOSTNAME = hostname" (without this line? then add this line right), then run the command "hostname host name." Generally have to modify / etc / hosts file in the host name. In this way, whether you reboot, the host name is successfully modified.
1002 Red Hat Linux boot to a text interface (do not start xwindow) (Chen Xu)
vi / etc / inittab
id: x: initdefault:
x = 3: text x = 5: graphic
1003 linux automatic updates problem (hutuworm, NetDC, Chen Xu)
For redhat, in www.redhat.com/corp/support/errata/ find patch 6.1 later with a tool up2date, it can determine what needs to upgrade the rpm package, then automatically downloaded from the redhat site and complete the installation.
In addition to kernel upgrade outside the rpm: up2date-u
Upgrades, including kernel, including the rpm: up2date-u-f
The latest redhat and fedora yum command can be used to upgrade or yumex graphical front-end update.
Upgrade Gentoo update portage tree: emerge-sync
Update / install packages: emerge [package name] (such as installing vim: emerge vim)
Debian with other distributions have a lot of difference, to do with the Debian server maintenance more convenient. Debian to upgrade the software:
apt-get update
apt-get upgrade
Premise: configured the network and / etc / apt / sources.list, you can also use apt-setup settings.
1004 windows to see linux partition under software (Chen Xu, hutuworm)
Paragon.Ext2FS.Anywhere.2.5.rar and explore2fs-1.00-pre4.zip
Today, many Linux distributions install by default built on LVM partitions, so explore2fs are the times began to support LVM2:
http://www.chrysocome.net/downloads/explore2fs-1.08beta9.zip
1005 mount usage (sakulagi, sxsfxx, aptkevin)
fat32 partition mount-o codepage = 936, iocharset = 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 mount / dev/fd0 / mnt / floppy
USB flash mount / dev/sda1 / mnt / cdrom
Scsi hard disk in a computer, if the above command to mount usb flash memory, it will mount to the / boot partition. This situation, you should use fdisk-l / dev / sd? To see in the end is a usb flash drive in which the device (usually be sdb or sdc). Such as a machine, is sdc1 above.
All / etc / fstab mount-a content
You can specify the file format "-t format", format for vfat, ext2, ext3 and so on.
Access DVD mount-t iso9660 / dev / dvd / mnt / cdrom or mount-t udf / dev / dvd / mnt / cdrom
Note: dvd format is generally one of iso9660 or udf
LINUX in 1006 in vmware the FAT partition using the local hard disk (Chen Xu)
FAT partition will be the local share, and then hang in VMWARE using SMBFS. Can be the following line into / etc / fstab in:
/ / Win_ip / D $ / mnt / d smbfs defaults, auto, username = win_name, password = win_pass, codepage = 936, iocharest = gb2312 0 0
One win_ip is the IP address of your windows;
D $ is inside your windows shared D drive share name;
/ Mnt / d is to mount the partition to the linux directory;
win_name and win_pass inside your WINDOWS user can read the partition, such as your administrator name and password.
If you run the / etc / rc.d / init.d / netfs, then the start time will automatically mount the partition.
1007.a delete a file called-a (Chen Xu)
rm. /-a
rm --a tells rm This is the last option, see getopt
ls-i lists inum, and then find.-inum inum_of_thisfile-exec rm '{}' \;
1007.b delete the file named \ a file (Chen Xu)
rm \ \ a
1007.c delete the name with the / and '\ 0' file (Chen Xu)
These characters are not allowed by the normal file system characters, but may be generated in the file name, such as a unix NFS file system used on the Mac
1 solution, the NFS file system is not linked to the filter '/' character to delete system files with special file name.
2 error file name can also be other files to remove the directory, ls-id display the directory containing the file inum, umount the file system,
clri clear the directory inum, fsck, mount, check your lost + found, rename the file in it.
Preferably through WINDOWS FTP in the past you can delete any file name of the files!
1007.d delete invisible character with the name of the file (Chen Xu)
Lists the file name and dump to a file: ls-l> aaa
Then edit the contents of the file add the contents of the rm command to delete the file format as:
vi aaa
[Rm-r *******
]
The file with execute permission chmod + x aaa
Executive $ aaa
1007.e delete files with zero size files (Chen Xu)
rm-i `find. /-size 0`
find. /-size 0-exec rm {} \;
Or
find. /-size 0 | xargs rm-f &
Or
for file in * # define their own type of file to delete
do
if [!-s $ {file}]
then
rm $ {file}
echo "rm $ file Success!"
fi
done
1008 redhat setting wheel mouse (mc1011)
Into X, choose the configuration of the mouse, select the wheel mouse (ps / 2) on it,
If the mouse to behave abnormally, restart the computer.
(Or su, vi / etc/X11/XF86Config, the PS / 2 into ImPS / 2)
1009 installation of xwindow (Chen Xu)
CD-ROM with the linux boot, choose to upgrade, and then select individual packages, can be installed
1010 to delete linux partition (Chen Xu)
Make a partition magic boot floppy, start to delete, or start with a win2000 boot CD, then delete.
1011 How to quit man (Chen Xu)
q
1012 does not compile the kernel, mount ntfs partition (Chen Xu, hutuworm, qintel)
Original rh8, or compile the kernel was not upgraded
1 on google.com search and download the 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
Or
Read only: http://www.linux-ntfs.org/
Read / Write: http://www.jankratochvil.net/project/captive/
1013 tar-volume compression and consolidation (WongMokin, Waker)
500M per roll, for example
tar-volume compression: tar cvzpf - somedir | split-d-b 500m
merge multi-volume tar: cat x *> mytarfile.tar.gz
1014 using the lilo / grub recover forgotten when the root password (Chen Xu)
Three ways:
1 in the system into single-user state, the direct use passwd root to change the
2 with the installation CD to boot the system, the linux rescue the state, the original / partition mount up, the practice is as follows:
cd / mnt
mkdir hd
mount-t auto / dev / hdaX (original / partition where the partition number) hd
cd hd
chroot. /
passwd root
This can get
3. This machine's hard drive to win, hanging on to other linux system, using the same approach and the second
rh8 one. lilo
1. In the event of lilo: prompt, type linux single
Screen display lilo: linux single
(2) enter directly into the linux command line
3. # Vi / etc / shadow
The first line, that is the beginning of the line root root: and after the next: first the contents of the deleted
The first line is similar to
root ::......
Save
4. # Reboot reboot, root password is empty two. Grub
1. Grub screen appears, select using the arrow keys that you usually start a linux (do not choose dos yo), then press e
2 once again selected using the arrow keys that you usually start a linux (like kernel / boot/vmlinuz-2.4.18-14 ro root = LABEL = /), then press e
3 changes you now see the command line, add single, results are as follows:
kernel / boot/vmlinuz-2.4.18-14 single ro root = LABEL = /
4 carriage return, then press the b key to start, you can go directly to the linux command line
5. # Vi / etc / shadow
The first line, that is the beginning of the line root root: and after the next: first the contents of the deleted
The first line is similar to
root ::......
Save
6. # Reboot reboot, root password is empty
1015 to ctrl + alt + del fails (Chen Xu)
vi / etc / inittab
The ca:: ctrlaltdel: / sbin / shutdown-t3-r now comment out this line, you can
1016 to see the redhat version is 7 or 8 (hutuworm)
cat / proc / version or cat / etc / redhat-release or cat / etc / issue
1017 rpm file in which the (Warriors)
On www.rpmfind.net found on, or get rpm-qf filename
1018 man or info information saved as a text file (Chen Xu)
In tcsh, for example:
man tcsh | col-b> tcsh.txt
info tcsh-o tcsh.txt-s
1019 using the existing two files to generate a new file (Chen Xu)
Prerequisites: Each file must not contain any duplicate rows
1 Remove the two files and set (keep a copy of duplicate rows only)
2 Remove the intersection of two files (leaving only two files exist in the file)
3 Delete the intersection, leaving the other line
1. Cat file1 file2 | sort | uniq
2. Cat file1 file2 | sort | uniq-d
3. Cat file1 file2 | sort | uniq-u
1020 set the com1 port, com1 port via HyperTerminal to log in (Chen Xu)
Recognizing the / sbin / agetty, edit / etc / inittab, add
7:2345: respawn: / sbin / agetty / dev/ttyS0 9600
9600bps is because this is generally associated router default rate, can also be set
19200,38400,57600,115200
Modify / etc / securetty, add a line: ttyS0, to ensure that the root user can log on to restart the machine, you can unplug the mouse, keyboard, monitor (start to look better output) of the
1021 Delete all files and subdirectories under the directory (Chen Xu)
rm-rf directory name
1022 View system information (Chen Xu)
cat / proc / cpuinfo - CPU (ie vendor, Mhz, flags like mmx)
cat / proc / interrupts - interrupt
cat / proc / ioports - Device IO Port
cat / proc / meminfo - memory information (ie mem used, free, swap size)
cat / proc / partitions - all partitions of all devices
cat / proc / pci - PCI device information
cat / proc / swaps - all the information Swap partition
cat / proc / version - Linux version number is equivalent to uname-r
uname-a - look at the system kernel and other information
1023 to remove the extra carriage return (Chen Xu)
sed 's / ^ M / /' test.sh> back.sh, note that ^ M is a knock ctrl_v ctrl-m to get or dos2unix filename
1024 switch X desktop (lnx3000)
If you are a graphical login to log on linux, then click on the login screen session (tasks) that you can choose gnome and kde. If you are text log, then perform switchdesk gnome or switchdesk kde, then startx to get into gnome or kde.
(Or vi ~ /. Xinitrc, add or modify as exec gnome-session or exec startkde,
Then startx starts X)
1025 generic sound card driver (lnx3000)
OSS www.opensound.com/ ALSA www.alsa-project.org/
1026 to change the redhat system language / character set (beming/mc1011)
Modify / etc/sysconfig/i18n documents, such as
LANG = "en_US", xwindow will display English interface,
LANG = "zh_CN.GB18030", xwindow Chinese language interface will be displayed.
Another method
cp / etc/sysconfig/i18n $ HOME/.i18n
Modify $ HOME/.i18n documents, such as
LANG = "en_US", xwindow will display English interface,
LANG = "zh_CN.GB18030", xwindow Chinese language interface will be displayed.
This can change the individual's interface language, without affecting other users
(Debian does not support GB18030 (RH of zysong font is copyrighted)
Now does not seem to Free the GBK and GB18030 font
vi. bashrc
export LANG = zh_CN.GB2312
export LC_ALL = zh_CN.GB2312)
1027 screen is set to 90 (Chen Xu)
stty cols 90
1028 use the md5sum file (Chen Xu)
md5sum isofile> hashfile, the md5sum file and hashfile file content comparison, validation hash value is consistent md5sum-c hashfile
1029 more than one extract the zip file (Chen Xu)
unzip "*", note the quotation marks can not be less
1030 view pdf file (Chen Xu)
Use xpdf or install acrobat reader for linux
1031 Find the file permission bits of S (Chen Xu)
find.-type f \ (-perm -04000-o-perm -02000 \)-exec ls-lg {} \;
1032 install Chinese input method (Chen Xu, hutuworm)
To redhat8 example, xwindow its terminal under needless to say, the default on install, use ctrl-space breath.
Now discuss the pure console, go to http://zhcon.sourceforge.net/ download zhcon-0.2.1.tar.gz, on any directory, tar xvfz zhcon-0.2.1.tar.gz, cd zhcon-0.2 .1,. / configure, make, make install. Installation is complete, in order, run the zhcon, want to exit, run exit.
1033 back to the pop-up CD-ROM (beike)
# Eject-t
1034 cd iso file made CD-ROM (mentally handicapped)
cp / dev / cdrom xxxx.iso
1035 quick start viewing hardware detection (mentally handicapped)
dmesg | more
1036 view hard disk usage (Chen Xu)
df-k to K units display
df-h to display user-friendly units, which can be b, k, m, g, t..
1037 view directory size (Chen Xu)
du-sh dirname
-S Display only a total of
-H to K, M, G unit, to improve the readability of information. KB, MB, GB is 1024 for the conversion unit,-H in 1000 as a conversion unit.
1038 Find a file or delete the process being used (wwwzc)
fuser filename
fuser-k filename
1039 installation software (Chen Xu)
rpm-ivh aaa.rpm
tar xvfz aaa.tar.gz; cd aaa;. / configure; make; make install
1040 character mode set / delete environment variables (Chen Xu)
set under bash: export variable name = variable value to delete: unset variable name
set under csh: setenv variable value variable name to delete: unsetenv variable name
1041 ls how to see hidden files (ie. At the beginning of the file) (eyelid pig)
ls-a
l. (for redhat)
1042 rpm files install gone (Chen Xu)
rpm-qpl aaa.rpm
1043 using src.rpm (Chen Xu)
rpmbuild - rebuild *. src.rpm
1044 vim does not display color or display color (Chen Xu, sakulagi)
First, make sure to install vim-enhanced package, then, vi ~ /. Vimrc; if syntax on, the display color, syntax off, the color is not displayed.
In addition, about vi's syntax color, another point is the terminal type (the environment variable TERM) settings. Example, usually set to xterm or xterm-color to use syntax color. Especially from Linux to other remote landing on Unix.
1045 linux real-time or time-sharing operating system (Chen Xu)
Time-sharing
1046 make bzImage-j j-mean (wind521)
-J is mainly used when your system hardware resources are relatively large, relatively affluent, you can use this to speed up the compilation speed, such as-j 3
1047 how no source packages (Chen Xu)
You do not have the source code, you put your CD on the rpm-i * kernel * source *. rpm installed, you can see your source code.
1048 to modify the system time (Chen Xu, laixi781211, hutuworm)
date-s "2003-04-14 cst", cst refers to the time zone, time set with the date-s 18:10
Changes into CMOS clock-w writes
hwclock - systohc
set the hardware clock to the current system time
1049 to mount on the windows boot partition (Chen Xu)
Automatically linked to the windows drive d / mnt / d, and with vi to open / etc / fstab, add the following line
/ Dev/hda5 / mnt / d vfat defaults, codepage = 936, iocharset = cp936 0 0
Notice served by hand to create a / mnt / d directory
1050 linux how to use so much memory (Chen Xu)
In order to improve system performance and do not waste memory, linux and more memory to do the cache, to improve the io speed
1051 FSTAB final configuration items inside the last two numbers mean (lnx3000)
The first is called fs_freq, used to determine which file systems need to perform dump operations, 0 is not required;
The second is called fs_passno, fsck program when the system detects the disk to restart the sequence number
1 is the root file system, 2 is the other file system. fsck disk detected by serial number, 0 means that the file system is not being detected
ext2 file system dump perform the backup operation
detect and repair the file system fsck
1052 linux in the user's password must have a certain length, and in line with the complexity (eapass)
vi / etc / login.defs, change PASS_MIN_LEN
1053 linux in the translation software (Chen Xu, hutuworm)
StarDict xdict
dict the next there is a console tool, to dict.org DICT protocol dictionary on the check 11, for example: dict RTFM
1054 not to display sleep (Chen Xu)
setterm-blank 0
setterm-blank n (n is the waiting time)
1055 queries with dat yesterday's date (gadfly)
date - date = 'yesterday'
1056 xwindow how to screen shot (Chen Xu)
Ksnapshot or gimp
1057 Souvenir extract (Chen Xu, noclouds)
tar-I or bunzip2 command can be extracted. bz2 files
tar xvfj example.tar.bz2
tar xvfz example.tar.gz
tar xvfz example.tgz
tar xvf example.tar
unzip example.zip
tar-jvxf some.bz, is to tar the zvxf into jvxf
zip / tar rh8 under a graphical interface software file-roller can do this. Also you can use unzip *. zip unlock the zip file, unrar *. rar unlock the rar file, unrar but the general system does not own, to go to download.
# Rpm2cpio example.rpm │ cpio-div
# Ar p example.deb data.tar.gz | tar zxf -
Alien offers. Tgz,. Rpm,. Slp and. Deb compression format such as converting between:
http://sourceforge.net/projects/alien
sEx provides almost all of the visible interface to extract the compressed format:
http://sourceforge.net/projects/sex
1057-2 tar compression, decompression usage (platinum)
Extract: x
Compression: c
For gz: z
For bz2: j
For display: v
Extract examples
gz file: tar xzvf xxx.tar.gz
bz2 files: tar xjvf xxx.tar.bz2
Compression Example
gz file: tar czvf xxx.tar.gz / path
bz2 files: tar cjvf xxx.tar.bz2 / path
1058 in a multi-level directory for a file method (Qinghai Lake)
find / dir-name filename.ext
du-a | grep filename.ext
locate filename.ext
1059 not to ordinary users to change their own password (myxfc)
[Root @ xin_fc etc] # chmod 511 / usr / bin / passwd
They want the ordinary user to change password
[Root @ xin_fc etc] # chmod 4511 / usr / bin / passwd
1060 graphics card is good enough for how to do (win_bigboy)
To http://www.redflag-linux.com/, under xfree86 4.3 installed on it.
1061 Super remove formatting tools (mentally handicapped)
PQMagic secure than the establishment of a small tool to delete format: sfdisk.exe for msdos
http://www.wushuang.net/soft/sfdisk.zip
1062 How to make xmms play list to display the correct Chinese (myxfc)
-*-*-*-*-*- Iso8859-1,-misc-simsun-medium-r-normal - 12-*-*-*-*-*- gbk-0, *- r-
Put this thing to completely copy the font inside your methods of operation:
Right-click anywhere in xmms player tool will see an "Options" and select "Preferences" Select "fonts"
Then a complete copy of the font above the "Playlist" and "user x font
1063 redhat linux play mp3 files (hehhb)
Xmms can not play with the original MP3 (silent), to install an RPM package: rpm-ivh xmms-mp3-1.2.7-13.p.i386.rpm. Open xmms, ctl-p, the first column in the font small box in the upper half of the tick, and then select the "fixed (misc) gbk-0 13"-point font to display Chinese song names. In the audio output plug-in, select "open audio system driver 1.2.7 [lioOSS.so], can play MP3 files properly.
1064 Installation of Chinese fonts (hehhb)
First download http://freshair.netchina.com.cn/ ~ George / sm.sh
(Reference: http://www.linuxeden.com/edu/doctext.php?docid=2679)
SimSun18030.ttc the Microsoft Web site to download, http://www.microsoft.com/china/windows2000/downloads/18
030.asp it is a msi file to install the mswindows used, installed after the fonts in the windows directory
Directory you can find it. The simsun.ttc, SimSun18030.ttc, tahoma.ttf, tahomabd.ttf
Copied to / usr / local / temp, then download the files into the shell in this directory, then open the terminal
cd / usr / local / temp
chmod 755 sm.sh
. / Sm.sh
1065 load windows partition FAT32, FAT16 file system (hehhb, NetDC)
As root, enter the KDE, click on the desktop "start" icon in the / mnt directory, create the following folder: c, d, e, f, g, usb. The district were used as the windows and usb flash drives.
With a text editor to open / etc / fstab file by adding the following:
/ Dev/hda1 / mnt / c vfat iocharset = gb2312, umask = 0, codepage = 936 0 0
/ Dev/hda5 / mnt / d vfat iocharset = gb2312, umask = 0, codepage = 936 0 0
/ Dev/hda6 / mnt / e vfat iocharset = gb2312, umask = 0, codepage = 936 0 0
/ Dev/hda7 / mnt / f vfat iocharset = gb2312, umask = 0, codepage = 936 0 0
/ Dev/hda8 / mnt / g vfat iocharset = 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 iocharset = gb2312, umask = 0, codepage = 936 0 0
Save and exit. Reboot to normal access to FAT32 or FAT16 format partition, partition solution shown WINDOWS Chinese file name and CD-ROM under the garbage problem. One of six rows, each row separated by the Tab key. Note that this method can only mount on Fat partition format, sda1 is the stick.
In addition, if it is garbled, you can change iocharset = utf8.
1066 under X use Wubi and Pinyin, location input (hmkart)
Fcitx from http://www.fcitx.org/ download the rpm package can be installed
1067 in Linux, how to extract rar files (hmkart)
http://www.linuxeden.com/download/softdetail.php?softid=883
Download rar for Linux 3.2.0, make open, extract
Then you can use unrar e youfilename.rar extract rar files
1068 hard drive installation how to add / delete the rpm package (sakulagi)
redhat-config-packages - isodir = <PATH>
You can specify the directory where the iso file
1069 characters under the control volume (grub007, outer Lonely)
Using aumix. In addition, the volume level you want to save oss, the steps are:
1, adjust the volume with aumix volume for your satisfaction
2, with the root user to enter / usr / lib / oss under (oss the default installation directory)
3, execution. / Savemixer. / Mixer.map
4, ok, later oss open after the first step is to adjust the volume you had.
ps: read the README of the directory can get more useful information.
1070 using dd to do iso (grub007)
dd if = / dev / cdrom of = / tmp / aaa.iso
1071 removed a few days ago everything (including the directory name and files in the directory) (shally5)
find.-ctime +3-exec rm-rf {} \;
Or
find. /-mtime +3-print | xargs rm-f-r
1072 where the user's crontab (hutuworm)
/ Var / spool / cron / username next to a file named
1073 to run the program as a different user (Chen Xu)
su - username-c "/ path / to / command"
Sometimes need to run the special status of the program, you can do to su
1074 How to empty a file (Chen Xu)
> Filename
1075 Why OpenOffice can not be displayed Chinese (allen1970)
Change the font settings
tools-> options-> font replacement
Andale Sans UI -> simsun
1076 How to backup Linux system (Purge)
Symantec Ghost 7.5 Ext3 native support for later copy
1077 linux on the partition magic (wwwzc)
Partition under Linux a useful tool: parted
Real-time resize partitions, delete / create partitions.
1078 / proc / sys / sem What does it mean in each? (Sakulagi)
/ Proc / sys / sem as follows
2503200032128
These four parameters were SEMMSL (each user has the maximum number of semaphore), SEMMNS (maximum number of semaphore system), SEMOPM (per semop system call a few), SEMMNI (the maximum number of semaphore sets system)
1079 Grub boot menu bigmem smp up all mean? (Lnx3000)
smp: (symmetric multiple processor) symmetric multi-processor mode
bigmem: support more than 1G of memory optimized kernel
up: (Uni processor) single-processor mode
1080 Oracle of the installation process why the garbled? (Lnx3000)
Now Oracle installer support of the Chinese problem, use only English interface to install, running runinstaller before execution: export LANG = C; export LC_ALL = C
1081 linux files and directories under the color mean anything (sakulagi, mentally handicapped)
Blue directory; green represent an executable file; red archives; light blue indicates a link file; Gray said other documents; red flashing indicates a problem linked file; yellow is the device file, including block, char, fifo.
With dircolors-p to see the default color settings, including a variety of colors and the "bold", underline, blinking and other definitions.
1082 to see how many activities of the httpd script (Chen Xu)
#! / Bin / sh
while (true)
do
pstree | grep "* \ [httpd \] $" | sed 's / .*- \ ([0-9] [0-9] * \) \ * \ [httpd \] $ / \ 1 /'
sleep 3
done
1083 How to add a hard drive (nice)
First, shut down, physically connect the hard disk if the IDE hard drive, pay attention to the main, from the disk set; If a SCSI hard drive, pay attention to selecting an unused ID.
Second, the power to check the hard disk has not been detected linux
dmesg | grep hd * (ide hard drive)
dmesg | grep sd * (SCSI drives)
Or less / var / log / dmesg
If you do not detect your new hard drive, reboot, check the connections to see if there are bios did not recognize it.
Third, the partition you can use fdisk, Sfdisk or parted (GNU partitioning tool, linux under partition magic)
Fourth, the format
mkfs
Fifth, to modify fstab
vi / etc / fstab
1084 linux partition under the label to see how ah (q1208c)
e2label / dev / hdxn, where x = a, b, c, d. ...; n = 1,2,3 ...
1085 RH8, 9 after installing How to add new language packs (nice)
A .8.0 in
1 into the first CD-ROM
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 the padded back section, so as not to make a mistake)
4.rpm-ivh ttfonts-ZH_TW-2.11-15.noarch.rpm (Traditional Chinese)
If you want to install Japanese, Korean, try the second disc ttfonts *. rpm.
Two .9.0 in
9.0 is not the first disk in the third disk. Rpm package names are:
ttfonts-zh_CN-2.12-1.noarch.rpm (Simplified Chinese)
ttfonts-zh_TW-2.11-19.noarch.rpm (Traditional Chinese)
1086 terminal screen capture (tsgx)
cat / dev / vcsX> screenshot of which, X represents the first X terminals can run script screen.log, record on-screen information to screen.log years. For a record of your exit end. This is also a good way to screen capture.
This is seen on a debian cookbook. Can be used on the RH9. Not tested on other systems.
1087 for a program to continue running after logout (NetDC, eyelid pig)
# Nohup program name &
Or use the disown command can also be
1088 man command not in the path, how to view the file non-standard man (Chen Xu)
nroff-man / usr/man/man1/cscope.1 | more
1089 cp to display the progress (Chen Xu)
cp-r-v dir1 dir2
cp-a-d-v dir1 dir2
1090 edit / etc / inittab after the direct effect (Chen Xu)
# Init q
1091 for several consecutive linux command error stop (Chen Xu)
command1 & & command2 & & command3
1092 how to install grub to the mbr (Chen Xu, NetDC)
grub> root (hd0, 0)
grub> setup (hd0)
You can also use # grub-install / dev / hda to install grub.
1093 installation, the grub (lilo) write linux partition boot sector or master boot sector (MBR) (Chen Xu)
If you want to boot directly into a computer operating system boot menu to put grub (lilo) to write the MBR, if you write to linux partition boot sector is to use the bootdisk. Proposal writing MBR, convenient point, as that writes MBR unsafe, how to explain it? Every once installed win98, MBR will be changed once you feel unsafe do what?
1094 how to make multi-system co-exist (Chen Xu)
98, then use lilo (grub) boot, 2k/nt boot multiple systems using osloader
1095 how the graphical interface and console (Character Interface) switch back and forth between (Chen Xu)
a. graphical interface to the console: Ctr + Alt + Fn (n = 1,2,3,4,5,6).
b. The switch between the console: Alt + Fn (n = 1,2,3,4,5,6).
c. console to graphics: Alt + F7
1096 Redhat linux common commands (Chen Xu)
<1> ls: directory listing.
Usage: ls or ls dirName, arguments:-a show all files,-l List files in detail.
<2> mkdir: build directory.
Usage: mkdir dirName, parameters:-p build multi-level directory, such as: mkdir a / b / c / d / e / f-p
<3> mount: Mount the partition or image file (. Iso,. Img) file.
Usage:
a. disk partition: mount deviceName mountPoint-o options, which deviceName is the disk partition's device name, such as / dev/hda1, / dev / cdrom, / dev/fd0, mountPoint is the mount point, it is a directory, options are parameters, if the partition is linux partition, generally do not have-o options, if the windows partition that options can be iocharset = cp936, so windows partition in the Chinese file name can be displayed. Use cases: for example, / dev/hda5 is linux partition, I want to hook it up to a directory (such as it is not a directory a first mkdir a), mount / dev/hda5 a, so what is the directory where a partition hda5 in the things, such as hda1 is the windows partition, we should hook it up to b on, mount / dev/hda1 b-o iocharset = cp936.
b. image: mount fileName mountPoint-o loop, fileName is the image file name (*. iso, *. img), others do not say, as above. Use Case: If I have a a.iso CD image file, mount a.iso a-o loop, so you can browse into the directory a a.iso the contents, *. img file use the same.
<4> find: Find files.
Usage: find inDir-name filename, inDir is the directory in which you want to find, filename is the name of the file you are looking for (you can use wildcards), when the filename with wildcards best single quotation marks, or sometimes error, use case: find.-name test *, in the current directory to find files starting with test.
<5> grep: find the file specified string.
Usage: grep string filename, the filename (can be wildcard) in the search string (best to use double quotation marks). Parameters:-r filename in all subdirectories of where to find. Use Case: grep hello *. c-r in the current directory (including subdirectories) in all. C files to find hello.
<5> vi: Editor.
Usage: vi filename. filename that you want to edit text files. With the implementation of vi filename, you may find that you can not edit the text, do not worry, this is because not enter the vi editor, press a or i can enter edit mode, and enter the edit mode you can edit the text after the. To exit the edit mode, press the Esc key on it. The following operations are performed in non-edit mode. Find text: I / you want to find the text and press Enter. Exit: type: and q and press Enter, if you modify the text, then you use: q! Enter to exit. Save: Input: w enter, if it is read-only file to use: w!. Save and exit: enter: wq enter, if it is read on: wq! Enter. Cancel: Press u on it, press the Cancel step, according to cancel several more steps. Copy and paste line of text: Move the cursor to the line to be copied anywhere, by yy (that is, double click on the y), move the cursor where you want to paste the previous line, according to p, just that line of text will be line where the cursor into the next line, the original line after the cursor down one row all the rows automatically. Copy and paste multiple lines of text: copy the line with similar, but to enter into yy the number of rows to be copied followed by yy, behind the same operation. Move the cursor to the specified line: input: and a line number and enter, such as the move to line 123: 123 Enter, move to the end: $ Enter.
1097 linux how to close a text interface pc speakers (labrun)
The / etc / inputrc in the set bell-style none before the # removed, or echo "set bell-style none">> ~ /. Bashrc
Lead to reinstall windows 1098 can not boot linux solution (nice)
If you do not re-partition, get linux boot disk (or the first installation CD-ROM) boot into rescue mode. First, find the original / partition mount in any place. redhat usually / mnt / sysimage. execute "chroot / mnt / sysimage". if it is grub, type grub-install / dev / hd * (based on availability); If it is lilo, type lilo-v, and then restart. If the partition is changed, corresponding to modify / etc / lilo.conf and / boot / grub / grub.conf and then execute the command.
Why LINUX installed after 1099 win2K very slow (lnx3000, nice)
Old problem, you can see in 2000 is not a Linux logical, but can not access?
In Disk Management, the select the disk, right-click -> Change "Drive Letter and Path" -> "delete" on it, pay attention not to delete the disk!
1100 release of the linux iso file to burn to CD method (Chen Xu)
Borrow the windows in the nero software, select the image file to burn, choose iso file, burn to!
1101 linux Way to burn iso (hutuworm)
Method One : Use xcdroast, choose to create CD-ROM , Select the ISO file , Burn !
See http://www.xcdroast.org/xcdr098/faq-a15.html#17
Method Two : Command to find burner :
cdrecord --scanbus
Output is :
0,0,0 0) 'ATAPI ' 'CD-R/RW 8X4X32 ' '5.EZ' Removable CD-ROM
Burn command :
cdrecord -v speed=8 dev=0,0,0 hutuworm.iso
Method Three : Can burn with k3b CD/DVD
k3b Home :http://www.k3b.org/
( In fact k3b is a graphical interface , Burn a CD using the cdrecord, Burn a DVD using the dvd+rw-tools http://fy.chalmers.se/~appro/linux/DVD+RW/ )
1102 How to do when the screen changes take ( Pig eyelid )
When you accidentally cat is not a text file when the , Then the screen will become flowers, you can double-click "Enter" Key, then hit "reset", Then the screen back to normal ....
1103 How to uninstall the package that specific package name (diablocom)
We all know the command to delete the package is rpm-e XXX, but when we do not know XXX The exact spelling, you can use rpm -q -a Query all installed packages or use rpm -qa |grep xxxx Check out the name of the
1104 Memory for use under linux /tmp Folder (yulc)
In the / etc / fstab to add a line :
none /tmp tmpfs default 0 0
Or in the / etc / rc.local add
mount tmpfs /tmp -t tmpfs -o size=128m
Note :size=128m That / tmp maximum usable 128m
Either way, as long as linux Reboot, / tmp files all disappear under the
1105 List only directories with ls (yulc)
ls -lF | grep ^d
ls -lF | grep /$
ls -F | grep /$
1106 In the command line following the IP address of the machine , And not get card information (yulc)
ifconfig |grep "inet" |cut -c 0-36|sed -e 's/[a-zA-Z: ]//g'
hostname -i
1107 Modify / etc / profile or $HOME/.profile How effective immediately after the file (peter333)
#source /etc/profile ( Or source .profile)
1108 bg And the use of fg ( Chen Xu )
Enter ctrl + z, the current task will be suspended and a suspended , Number on the screen while the process of return, this time with "bg % Process number ", will perform this process in the background , But with " fg % Process number "will be able to make this process into the foreground to perform . In addition, job command is used to view the current bg Process
1109 ctrl+s And ctrl+q( Chen Xu )
ctrl-s To suspend sending data to the terminal screen as dead as , You can use the ctrl-q to resume
1110 Catalog statistics script ( Chen Xu )
Save as total.sh, then total.sh Absolute path, the path under the statistics can be the size of a directory
Code :
#!/bin/sh
du $1 --max-depth=1 | sort -n|awk '{printf "%7.2fM ----> %s\n",$1/1024,$2}'|sed 's:/.*/\([^/]\{1,\}\)$:\1:g'
1111 grep Process does not show itself ( Chen Xu )
#ps -aux|grep httpd|grep -v grep
grep -v grep You can cancel the show itself, the process performed grep ,-v Parameter is not displayed process name listed
1112 Enter a keyword to delete the directory containing the file (WongMokin)
find /mnt/ebook/ -type f -exec grep " Enter keyword " {} \; -print -exec rm {} \;
1113 Cron does not allow feedback to the task , The cases of five minutes to check a mail (WongMokin)
0-59/5 * * * * /usr/local/bin/fetchmail > /dev/null 2>&1
1114 Extract the rpm file under the current directory ( Chen Xu )
cat kernel-ntfs-2.4.20-8.i686.rpm | rpm2cpio | pax -r
1115 Postscript or merge two PDF File (noclouds)
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite \
-sOutputFile=bar.ps -f foo1.ps foo2.ps
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-sOutputFile=bar.pdf -f foo1.pdf foo2.pdf
1116 Remove the apache manual Directory of all. En suffix name ( Chen Xu )
Into the manual directory
Code :find ./ -regex .*\.en|awk -F. '{ printf "mv %s.%s.%s.%s %s.%s.%s\n",$1,$2,$3,$4,$1,$2,$3}'|sh
1117 How to play multiple X(noclouds)
startx Default order display :0.0 From the first X, by passing a parameter to the Xserver Can play a more X:
# startx -- :1.0
# startx -- :2.0
...
Then switch Ctrl-Alt-F7/F8 ... .
1118 Let a program to continue running after logout (noclouds, Chen Xu )
# <cmd>
# disown
Or
nohup command &
1119 See Linux startup screen display information ( Chen Xu )
After starting with the command dmesg to view
1120 So that vi does not ring (sakulagi)
echo "set vb t_vb=" >> ~/.vimrc
1121 Let fedora boot sequence login(dzho002)
1) rpm -ihv autologin-1.0.0-7mdk.i586 rpm
2) Create a document /etc/sysconfig/autologin
Add a line in there .
USER = root
1122 How to configure which services start to ( Outer Lonely ,q1208c)
Method 1 run ntsysv Or the setup command , Enter the configuration menu
Method 2 chkconfig - list shows service
chkconfig name on/off Open / Close "name" Service
1123 Safely Remove linux( Outer Lonely )
Step 1 Dos to use fdisk /mbr CD-ROM or with win2000/xp start the Recovery Console , Use the command fixmbr
Step 2 Format linux For the windows partition to partition .
1124 Interface with the grub boot into text ( Outer Lonely )
After entering grub , Press a, input Box 3 can enter a text interface to guide , But does not modify the operation of the system level, only when the sub-effective .
1125 First test patch is working correctly , Temporarily to apply changes to kernel(jiadingjun)
patch --dry-run
1126 redhat And remove the debian install files on the usage of (NetDC)
Delete a package :
rpm -e <package-name>
dpkg -r <package-name>
Display the contents of a package :
rpm -qvl <package-name.rpm>
dpkg -c <package-name.deb>
Show all installed packages :
rpm -qvia
dpkg -l
Print a packet of information :
rpm -qpi <package-name.rpm>
dpkg -I <package-name.deb>
Test kits characteristics:
rpm -Va
debsums -a
Test a file belongs package :
rpm -qf </path/to/file>
dpkg -S </path/to/file>
Install a new software package :
rpm -Uvh <package-name.rpm>
dpkg -i <package-name.deb>
1127 How the new force users to change passwords the first time after landing ( Small cat )
#useradd -p '' testuser; chage -d 0 testuser
1128 Log maintenance tool logrotate(hotbox)
In the / etc / logrotate.conf configured , Effect : Define the log file reaches a predetermined size or time , Automatic log file compression
1129 Linux What's the default administrator ( Chen Xu )
root
1130 How to generate a fixed length ( For example, the file length 1M) Byte empty file, that is, the value of each byte are all 0x00(sakulagi)
dd if=/dev/zero of=/tmp/zero_file bs=1024 count=1024
1131 RedHat Linux The steps in the modification time (hutuworm)
1. Set your time zone : timeconfig Select Asia/Shanghai ( If you are in GMT +8 China region )
2. Calibration standard time servers : ntpdate time.nist.gov
2.5 Of course, if you are Li Ka-shing , You can watch with their own calibration : date -s STRING (STRING Format see man date)
3. Write back to the hardware clock : hwclock --systohc
1132 Find the file and change the current directory extension ( 2002 Summer )
Change all. Ss file .aa
# find ./ -name "*.ss" -exec rename .ss .aa '{}' \;
1133 patch Use ( ※ Genius Sakuragi )
Syntax is patch [options] [originalfile] [patchfile]
Such as :
patch -p[num] <patchfile
-p Parameter determines whether to use the source file name read out the prefix directory information not provided -p Parameters, then ignore all directory information ,-p0( Or -p 0) That the use of all of the path information,-p1 the first ignored "/" Previous directory, and so on . If / usr/src/linux-2.4.16/Makefile this file name , Parameters to provide will be used when-p3 linux-2.4.16/Makefile As a patch file to be .
For the Linux kernel source just cited 2.4.16 Update example, assume that source directory is located /usr/src/linux , Then the current directory /usr/src Use "patch -p0 <patch-2.4.16" Can work in the current directory /usr/src/linux Time ,"patch -p1<patch-2.4.16" You can also work .
1134 The file.txt in the 123 To 456(hutuworm)
Method 1
sed 's/123/456/g' file.txt > file.txt.new
mv -f file.txt.new file.txt
Method 2
vi file.txt
Enter the command :
:%s/123/456/g
:wq
1135 A partition formatted as ext3 journaling file system (hutuworm)
mkfs -j /dev/xxxx
1136 Open the hard drive ATA66 (laixi781211)
/sbin/hdparm -d1 -X68 -c3 -m16 /dev/hda
1137 View the current run level ( Pig eyelid )
runlevel
1138 View current visit status ( Pig eyelid )
(1)who am i
(2)whoami
(3)id
Note (1) With (2) The small difference
1139 Remove rpm-e to delete the package can not be (wwwzc)
1. If you remove the package before you remove the package directory
rpm -e --noscripts
2. If the system is loaded twice in a package ( Caused due to some abnormal )
rpm -e multi-installed-pkgs --allmatches
1140 How to customize the information displayed when the user logs (jiadingjun)
In the / etc directory called decentralization a motd The text files, such as , Establish their own /etc/motd:
$cat /etc/motd
welcome to my server !
So, when a user log will appear when this information :
Last login: Thu Mar 23 15:45:43 from *.*.*.*
welcome to my server !
1141 Empty Recycle Bin command files in the Root (dtedu)
cd /var/.Trash-root
rm -rf *
1142 On Red Hat Canada Simsun.ttc Fonts ( Chen Xu )
For example Red Hat 7.3 , Installation select install simplified Chinese, a first copy simsun.ttc To / usr/X11R6/lib/X11/font/TrueType, renamed simsun.ttf: Then enter / usr/X11R6/lib/X11/font/TrueType directory , Run ttmkfdir > fonts.dir Command : Then use vi editor fonts.dir File, by placing the simsun.ttf Modify the following line :
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-ascii-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso10646-1
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-iso8859-15
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-iso8859-1
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-m-0-gb2312.1980-0
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gbk-0
Then run cat fonts.dir > fonts.scale Command, modify the /etc/X11/XF86config-4, In the Section "Files" insert the following line :
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
Finally back in the KDE desktop , In the "Start " → "option " → "perception " → "font ", All fonts will be changed Simsun.
1143 Unicon And Zhcon difference and the role of ( Chen Xu )
Unicon Is the core platform for the Chinese state, based on the modified Linux FrameBuffer And Virtual Console(fbcon) Achieved due to the underlying implementation of the system is , Therefore, excellent compatibility, you can directly support gpm Mouse, but relatively dangerous , Slight flaw could compromise system security. Zhcon Chinese platform is user-state , A bit like UCDOS.
1144 How to install tar format software uninstall ( Chen Xu )
Install the software into the source code directory, run make uninstall. If not, you can also look Makefile File, mainly to see install Part, from which to identify tar Format files are copied to what path, then enter the appropriate directory can be deleted .
1145 Custom linux prompt ( Chen Xu )
Prompt in bash by an environment variable $PS1 Specified. With export $PS1 View the current value of intuitive common prompt can be set to export PS1="[\u@\h \W]\$". Among \u Behalf of the user name ,\h On behalf of the host name ,\W Representative of the last layer of the current working directory, if an ordinary user \$ Showed $,root User #.
1146 In the search for a word in vi , The word is highlighted, it looks very uncomfortable , How can it get rid of ( Chen Xu )
In vi command mode input :nohlsearch Can be the addition in ~/.vimrc Write the following statement will be highlighted :
set hlsearch
With the following statement would not have highlighted :
set nohlsearch
1147 How to find the system in all *.cpp.*.h File ( Chen Xu )
With the find command can be a . But if you look from the root of the high consumption of resources, use the following command can be :
find / -name "*.cpp" -o -name "*.h"
1148 Installing Debian needs a few disk if enough ?7 All you have to download the sheet tray ?( Chen Xu )
If the network environment is often the case, you can download the first . If not, then the network environment is not recommended to use Debian, because Debian Mainly dependent on the network to update the software. Really want to install it , To download the full 7 disk , Otherwise, the package may find the need arises the question .
1149 Debian Why does the first disc has two versions? Debian-30r1-i386-binary-1.iso and debian-30r1-i386-binary-1_NONUS.iso The download which one? What's the difference ?( Chen Xu )
Because it contains "non-US"( Not an American ) The software can not legally set up in the United States stored in the server. Ago , The reason is usually because the software code with strict password, and today , Is because the program uses the algorithm of U.S. patent protection, each person should be accessible "non-US" To be used for private purposes : Without this identification only to the erection of the iso image in the United States and suppliers only be useful . Other Binary CD-ROM does not contain any "US-sensitive"( Associated with the United States ) Software, they and other kinds of binary-1 CD operation as well, so , Personal use or to download debian-30r1-i386-binary-1_NONUS.iso version .
1150 Why do I use the umount / mnt / cdrom command when there device is busy Such statements can not be umount( Chen Xu )
When using the umount must ensure that exit /mnt/cdrom This directory, you can use this directory to exit umount /mnt/cdrom A .
1151 I am using a laptop, how can the console display how much power is left to do now ? ( Chen Xu )
Use apm-m you can see how many minutes , Specific parameters can be used to view man apm .
1152 Why do I access the Linux terminal window ,man A command out of it is garbled ? ( Chen Xu )
This is because your character set problem. A temporary solution you can use export LANG="en_US". To modify the words not always in /etc/sysconfig/i18n Files which modify the LANG = "en_US" on it . Can do for a user, so that you can change individual interface language , Without affecting other users. Command is as follows :# cp /etc/sysconfig/i18n $HOME/.i18n.
1153 Compile time error, suggesting "Too many open files", I ask how to deal with ( Chen Xu )
This is because the default file-max (8096) Too small. To solve this problem , Run the following command as root ( Or add them /etc/rcS.d/* Under the init script ):
# echo "65536" > /proc/sys/
Finally, enter the unzipped directory, run the installation command .
# cd vmware-linux-tools
# ./install.pl
1154 Originally equipped with Linux and Windows XP, After a reinstall of Windows XP , Linux and found that Windows XP Start menu, how to solve ( Chen Xu )
First, boot the CD, enter rescue Models, GRUB, A grub prompt grub>, And then typing the following statement, restart just fine .
root (hd0,2),setup (hd0)
1155 Installed a Linux server , Would like to compile your own kernel, step by step down ,GRUB Also added to it, but there "kernel Panic:VFS:Unable to mount root fs on 0:00" Error, how does that matter ?( Chen Xu )
Under normal circumstances initrd file on the desktop this is not necessary , But in a SCSI device server is a must . Possible because the compile time, did not produce the file initrd , So there will be above error. Users can use mkinitrd Command to generate a initrd.img file , Then add GRUB, try to restart .
1156 How to set user login welcome message ?( Chen Xu )
Modify / etc / motd file , Entered, write the text, will enable users to Telnet Properly logged in, execute Shell Before the corresponding message .
motd Is the "messages of the day", that is, the meaning of the day information . Administrators can be entered, write to note or a formal notification to alert the user .
1157 I downloaded rcs5.7, with ./configure && make && make install When the error is as follows :./conf.sh: testing permissions ... ./conf.sh: This command should not be run with superuser permissions. I logged in as root user to install compiled , Why is it so ?( Chen Xu )
Some software is really taking into account that security and other reasons can not be compiled with the root user . Then just compile with other users, to make install This step, if the software is not installed in the compilation of the user's home directory when , Need to use the su command to convert root Users then perform make install.
1158 I failed in installing USBView , Details are as follows : #rpm -ivh usbview-1.0-9.src.rpm warning:usbview-1.0-9.src.rpm:V3 DSAsignature:NOKEY,key IDab42a60e ( Chen Xu )
This line of code to install the failure is because your system is not installed the appropriate key to verify signatures. To make the package by checking , You can import Red Hat's public key to solve , Specific way is to run the following command at Shell :
#rpm -import /usr/share/rhn/RPM-GPG-KEY
( Attention to the case )
1159 How to prevent a critical file is modified ?( Chen Xu )
Under Linux , Some of the configuration file is not allowed anyone ( Include root) Modified order to prevent deletion or modification , You can set the file "can not modify the bit (immutable) ". Command is as follows :
# chattr +i /etc/fstab
If you need to modify the following command is used :
# chattr -i /etc/fstab
1160 How to limit a user can start the processes ?( Chen Xu )
First determine what / etc / pam.d / login file the following line in the presence of :
session required /lib/security/pam_limits.so
Then edit / etc / security / limits.conf, in which the user can set the process limit the number of .CPU Utilization and memory usage, etc., such as hard nproc 20 Refers to the 20 process limit , Concrete can be seen man.
1161 How to limit the size of Shell Command History ?( Chen Xu )
By default, bash in the file $HOME/.bash_history Holds up to 500 commands in the record . Sometimes, depending on the systems, the default number of records in different . System, each user's home directory has a file such order to the system's security , Is strongly recommended that users limit the size of the file the user can edit /etc/profile File, modify the following options :
HISTFILESIZE=30 Or HISTSIZE=30
This command will record the number reduced to 30 bar .
1162 I want to turn the information displayed when retained to check the computer out of the problem areas , Ask how to do ?( Chen Xu )
Can enter the following command :
#dmesg > bootmessage
The boot command will redirect output to display information in a file bootmessage .
1163 I want to log out when you remove the command record, may I ask how to do ?( Chen Xu ,mhxkcu)
Edit / etc / skel / .bash_logout file , Add the following line :
rm -f $HOME/.bash_history
In this way, the system when all users log off command will delete the record .
If only for a specific user, such as root User settings, the user can only modify the main directory /$HOME/.bash_logout File, you can add the same line .
1164 Kernel support ntfs Steps (platinum, Chen Xu )
1. # cd /usr/src/linux-2.4
2. # make menuconfig
3. Select File System under the NTFS file system support (read only) As M
4. # uname -a
2.4.21-27.0.2.EL
5. # vi Makefile
Ensure that the first few acts
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 21
EXTRAVERSION = -27.0.2.EL
6. # make dep
7. # make modules SUBDIRS=fs/ntfs
8. # mkdir /lib/moduels/2.4.21-27.0.2.EL/kernel/fs/ntfs
9. # cp -f fs/ntfs/*.o /lib/moduels/2.4.21-27.0.2.EL/kernel/fs/ntfs/
10. # depmod -a
11. # modprobe ntfs
12. # lsmod
Ensure ntfs inside
1165 How to use ssh tunneling ( Chen Xu )
This article discusses the Linux operating system, all machines are .
For example, my machine is A, the intermediate server B, Target server is C.
From A can ssh To B, from B Can ssh to C, But A can not be directly ssh To C.
Now demonstrate the use of ssh tunneling technology from A Transfer files directly to the C.
1. ssh -L1234:C:22 root@B
input B's password
2. scp -P1234 filename root@localhost:
input C's password
1166 Use the rpm command no response , How to solve ( Beginners Photography )
rm -rf /var/lib/rpm/__db.*
1167 To log on to the same server send a message to all users ( Chen Xu )
1) Enter the wall and enter
2) Enter the message to be sent
3) End of the press "Control-d" key , Information that is displayed in the user's control window
1168 Enter a short message to a single user ( Chen Xu )
1) Input write username, the user name appears in multiple terminals , After the user name can be added tty, to indicate in which tty Under the user .
2) Enter the message to be sent .
3) End of the press "Control-d" key , Information that is displayed in the user's control window .
4) For the party receiving messages, you can set whether to allow people to send messages to you .
Instruction format :mesg n[y]
%write liuxhello! Everybody, I'llcome.
%
User Control window displays the message :Message from liux on ttyp1 at 10:00-hello! Everybody, I'llcome.EOF
When using the CDE or OpenWindows Other window system, each window is seen as a single login : If the user is logged more than once then send the message directly to the control window .
1169 Send a message file to a single user ( Chen Xu )
If there is a longer message will be sent to several users, with papers :
1) Create a text message to send the file filename.
2) Enter write username<filename Enter, with cat Command creates a file containing a short message :
% cat >messagehello! Everybody, I'llcome.
% write liux<messagewrite:liux logged in more than once-write to console
% User log in more than one window, the message displayed in the control window Message from liux on ttyp1 at 10:00-hello! Everybody, I'llcome.EOF
1170 On the remote machine to send a message to all users ( Chen Xu )
Use rwall( Write to all remote ) Command while sending a message to all users of the network .
rwall hostname file
When using the CDE or OpenWindows Other window system, each window is seen as a single login ;
If the user is logged more than once then send the message directly to the control window .
1171 To the network to send a message to all users ( Chen Xu )
Send a message to all users of the network
1) Enter rwall-n netgroup and Enter
2) Enter the message to be sent
3) End of the press "Control-d" key , Messages that each user in the system to display the control window, the following are the system administrator send an announcement to the network group Eng Examples of each user :
% rwall -n EngSystem will be rebooted at 11:00.(Control-d)
%
User control in the message window :Broadcast message from root on console-System will be rebooted at 11:00.EOF
Note : You can also rwall hostname( Host Name ) Command to all users of the system .
1172 I need to compile the kernel, the kernel source, where ?(platinum)
1. General release of the plate has, for example RedHat, Usually in the second. On the third
2.4 Called the kernel kernel-source-2.4.xx-xx.rpm
2.6 Called the kernel kernel-devel-2.6.xx-xx.rpm
2. To download a copy of your favorite www.kernel.org
1173 The top of the results output to a file (bjweiqiong)
top -d 2 -n 3 -b >test.txt
Can be the result of every top 2 Seconds, print 3 Times, so the back page of the process can also be seen
1174 vim Full-sensitive approach to change ( Chen Xu )
Cursor on the text at the beginning
gUG All letters become uppercase
guG All letters become lowercase
g~G All letters, uppercase lowercase change , Change uppercase lowercase
1175 How to upgrade installation ubuntu( Chen Xu )
With ubuntu 7.04->7.10 Example .
mount -o loop /media/ubuntu-7.10-alternate-i386.iso /cdrom
gksu "sh /cdrom/cdromupgrade"
If agent :
export http_proxy=http://proxy.server.ip/; gksu "sh /cdrom/cdromupgrade"
1176 File uneven segmentation method (qintel)
$dd if=source of=target.1 bs=1M count=10
$dd if=source of=target.2 bs=1M skip=10
source And is divided into target.1 target.2 Two documents, which target.1 For the source of the former 10M Part :target.2 For the source of the minus 10M After some .
1177 I do not care to under Windows swap Partition formatted, is there any command to restore the ( Chen Xu )
Established using the mkswap command swap Partition, then use swapon Command to enable swap partition . The use of the command, for example, the following :
# mkswap /dev/sda7
# swapon /dev/sda7
1178 How to modify a file to prevent others ( Chen Xu )
The system in some of the key documents and important personal information, you can file permissions to protect , For example, the file attribute to 600 addition , If you are using a Linux ext2 Or ext3 file system , You can also use "chattr" command , With i attributes to the file , Even if the root user can not modify or delete these files directly , To prevent accidental changes from happening. The specific command as follows :
# chattr +i passwd
I use the following command to remove property :
# chattr - i passwd
1179 Batch change the extension ( Bai Qingjie )
for i in *.mp3; do mv $i `basename $i .mp3`.bak ;done
To will. Mp3 at the end of the file is renamed .mp3.bak Ending
-- Network-related articles --------------------------
2001 To allow apache's default character set into Chinese ( Chen Xu )
vi httpd.conf, Find AddDefaultCharset ISO-8859-1 line
apache Version if it is 1.*, To AddDefaultCharset GB2312
If 2.0.1-2.0.52, to AddDefaultCharset off
Then run / etc / init.d / httpd restart restart apache To take effect .
Note : For the 2.0.53 or later , Does not require any configuration, can support Chinese .
2002 Permanent change ip( Chen Xu )
ifconfig eth0 New ip
Then edit / etc/sysconfig/network-scripts/ifcfg-eth0, modify ip
2003 From the remote display on Linux Windows Desktop (lnx3000)
Install rdesktop package
2004 Manually add the default gateway ( Chen Xu )
As the root user , Execution : route add default gw Gateway IP
Want to change the gateway
1 vi /etc/sysconfig/network-scripts/ifcfg-eth0
Change GATEWAY
2 /etc/init.d/network restart
2005 redhat 8.0 And on msn qq( Chen Xu )
Download the version of Gaim 0.58 :
gaim-0.58-2.i386.rpm
Download plug-QQ for gcc2.9 Version :
libqq-0.0.3-ft-0.58-gcc296.so.gz
The downloaded file into the / temp directory , Then the system will delete the existing Gaim , That the terminal emulator, type the command :rpm -e gaim.
Start the installation
Open a terminal emulator, to run the following command to install Gaim 0.58 Version, that is :
cd /temp ( Into the temp directory )
rpm -ivh gaim-0.58-2.i386.rpm ( Installing software )
When the installation is successful, you can GNOME Or KDE desktop build Gaim Icons .
Plug-ins to install QQ , That is, type the command :
gunzip libqq-0.0.3-ft-0.58-gcc296.so.gz ( Unzip the file )
cp libqq-0.0.3-ft-0.58-gcc296.so /usr/lib/gaim ( Gaim plugin to copy the library directory )
Software settings
When you first start Gaim 0.85 version , The login screen will appear. First choice " Plug-ins "in the plug-in dialog box, click " Load ", respectively, libmsn.so And libqq-0.0.3-ft-0.58-gcc296.so file into , Confirm and close and then select " All accounts, "In the account editor to click " Increase ", when there account page changes , We can enter their own QQ or MSN Number, and fill in login name QQ Number or MSN mail , Fill in the corresponding QQ or password MSN Password, Alias fill out their own nickname , QQ or select the appropriate protocol MSN, The other set by default to when the log after the completion of all the settings used .
As the MS. msn The agreements often escalated, resulting in linux And on gaim msn Plug-ins must be upgraded, there is no foolproof solution to the current , Please forgive me
2006 Find out what the program is now running 22 ports ( Chen Xu )
lsof -i
2007 View this machine IP,gateway, dns( Chen Xu )
IP:
Log in as root , Execute ifconfig. Which eth0 Is the first NIC, lo is the default device
Gateway:
Log in as root , Execute netstat-rn, to 0.0.0.0 The beginning of a line of Gateway is the default gateway
You can also view / etc / sysconfig / network file , Inside the specified address !
DNS:
more /etc/resolv.conf, Content specified as follows :
nameserver 202.96.69.38
nameserver 202.96.64.38
2008 RH8.0 Ping command line to change the TTL Value (cgweb,lnx)
Method 1( Effective after restart ):
#sysctl -w net.ipv4.ip_default_ttl=N
(N=0~255), If N>255, Then ttl=0
Method 2( Invalid after reboot ):
#echo N(N As 0-255) > /proc/sys/net/ipv4/ip_default_ttl
2009 On the LINUX IP Forward (houaq)
Edit / etc / sysctl.conf, such as , Will
net.ipv4.ip_forward = 0
Becomes
net.ipv4.ip_forward = 1
Take effect after the restart, with sysctl -a View shows
2010 mount Other windows machines on the LAN to share a directory ( Chen Xu )
mount -t smbfs -o username=guest,password=guest //machine/path /mnt/cdrom
2011 Allow | Prohibited by root SSH Land (Fun-FreeBSD)
Modify sshd_config:PermitRootLogin no|yes
2012 Allow direct root telnet Land ( Chen Xu ,platinum)
Method 1:
Edit / etc / pam.d / login, to remove
auth required /lib/security/pam_securetty.so This sentence
Method 2:
vi /etc/securetty
Add
pts/0
pts/1
...
2013 Received in linux adsl Equipment (wind521)
Need a functioning Linux + at least one card + Application of broadband equipment has been completed, but has been opened . There are several currently on the market about ADSL equipment , They work the way some of the subtle differences .
Is accomplished through the virtual dial-up Internet access in the process, that is, using pppoe Equipment to carry out the virtual dial-up called omnidirectional cat, is a power automatically dial after work , Our interface is then left to RJ45, Dalian are generally left to our gateway 10.0.0.2, The device most likely to deal with, and finally assigned to the user directly to a fixed IP, Is relatively easier to deal with all
1. The first is the need for dial-up :
These types of devices through eth interfaces to communicate with the computer , So first make the connection hardware, especially broadband cat , Must confirm the correct ( Otherwise, not a moment to not be my thing )
Then start the system, verify that the system is installed on rp-pppoe This software ( By rpm -qa|grep pppoe To find ), If not installed users in the CD or go online down By one, after the installation , As the root user to perform adsl-setup, This information into a set state adsl , Asked to enter a user name for broadband and other information to confirm there is no problem , Accepted until the last ( Which are the E text , However, a look that can understand, relatively simple , About a firewall setting, I generally do not have , Select 0, we can consider specific ).
After configuration, the root Users to perform adsl-start, this will be adsl Dial-up work, it will look normal on-line , If you have any specific questions, take a look the log (/var/log/messages) Which tells you what .
Stopped adsl, implementation adsl-stop On it ( Very simple )
2. Easier to deal with the other two :
All the cats : As long as your network card's IP settings to a 10 Segment of the IP, and gateway refers to all the cats IP, On (10.0.0.2), Basically do not have much of a problem
Fixed IP: As configuring the network card as the local children, will IP, Gateway, DNS is an application to fill in on press can handle a
2014 To automatically synchronize time linux (shunz)
vi /etc/crontab
With a :
00 0 1 * * root rdate -s time.nist.gov
2015 linux What online resources ( Chen Xu )
Foreign
http://www.lesswatts.org/
http://www.moblin.org/
http://www.clutter-project.org/
http://lwn.net/
http://www.tldp.org/
http://www.yolinux.com/(flying-dance big big pig)
http://www.justlinux.com/
http://www.linuxtoday.com/
http://www.linuxquestions.org/
http://www.fokus.gmd.de/linux/
http://www.linux-tutorial.info/
http://public.[url]www.planetmirror.com/[/url]
http://www.freebsdforums.org/forums/
http://www.netfilter.org/documentation/
http://www-106.ibm.com/developerworks/linux/
Domestic
http://www.linuxpk.com/
http://www.fanqiang.com/
http://www.linuxsir.com/
http://www.chinaunix.net/
http://www.linuxfans.org/(deadcat)
http://www.linuxeden.com/
http://www.linuxforum.net/
http://freesoft.online.sh.cn/
http://www-900.ibm.com/developerWorks/cn/linux/index.shtml
http://www.neweasier.com/software.html
http://www.blueidea.com/bbs/archivecontent.asp?id=635906(sqh)
http://westlinux.ywzc.net/(onesun)
2016 Change sshd port ( Chen Xu )
In the / etc / ssh / sshd_config add a line :Port 2222,/etc/init.d/sshd restart Restart the daemon
2017 To change the telnet port ( Chen Xu )
The / etc / services file telnet The port number corresponding to the value you want 21 ,/etc/init.d/xinetd restart Restart the daemon
2018 Terminal mode problem (sakulagi)
export TERM=vt100
2019 Imitation HyperTerminal, LINUX in the procedure to connect the router and switch (alstone)
minicom
2020 ssh Can not fail to automatically break up (wind521, Pig eyelid )
Modify your HOME directory .bash_profile File, together with
export TMOUT=1000000 ( In seconds )
Then run source .bash_profile
2021 What to do with the intrusion detection tool ( Chen Xu )
snort
2022 Linux Memory leak detection program under the tools ( Chen Xu )
cchecker Or efence library can
2023 linux How to monitor all the data card through the machine ( Chen Xu )
tcpdump Or iptraf
2024 Why do a lot of commands as root say command not found( Chen Xu )
You telnet up , Then su to root Of it, to change to change your su Command format, should be su - root
2025 Close the user's POP3 access (tiansgx)
The POP3 port closed on it . In the file / etc / services to find the line pop-3 110/tcp Before this line to add a '#', It commented on it .
2026 linux The following play a flash animation (myxfc)
linux The following play a flash animation with this thing , Will not cause the browser to turn off ( Well with other plug-ins )
First, download the flash player animation linux Plug-ins
http://www.collaborium.org/onsit ... /flash_linux.tar.gz
tar zxvf flash_linux.tar.gz
Open the package, see Linux Folder
In linux, there are two files file cheek libflashplayer.so And shockwaveflash.class, these two files are copied to your browser's plug-in ( Not the same as the browser, plug-ins may not be the same location )
/usr/lib/mozilla-1.0.1/plugins, On it
2027 Lock wu-ftp user directory (wangla)
Edit ftpaccess file
restricted-uid *
This is a very important limiting ftp Users in their own directory .
2028 How to prevent the server telnet( Zhiqiu leaf )
Must start the telnet service on the server && Server firewall should be set to low priority
2029 Prevent anyone from using the su command to become root(xiaohu0)
1.vi /etc/pam.d/su
auth sufficient /lib/security/pam_rootok.so debug
auth required /lib/security/pam_wheel.so group=wheel
2. In the / etc / pam. D / su configuration file defines wheel Group .
2030 How to make the lynx browser to browse Chinese website (Ghost_Vale)
View Simplified Chinese website on the following set of changes
Save options to disk: [X]
Display and Character Set
Display character set : [Chinese________________________]
Assumed document character set(!): [iso-8859-1______]
CJK mode (!) : [ON_]
Then moved to the bottom of the press Accept Changes Enter Save on it
Of course, your system can only be to support Simplified Chinese
2031 Card activated, but not on the net , How to do ?(Slock, Pig eyelid )
traceroute, Look in the end is that one is standing in the way of .
1.ping Own
2.ping Gateway
3.ping DNS
4.traceroute DNS
If everything is normal
nslookup www.sina.com.cn
ping sina Of address
traceroute sina Of address
Basically you can know the result
2032 With the next redhat9 samba,win2000 Access, win98 can not access ?(squall2003)
If it is necessary to modify the registry wind98 :HKEY_LOCAL_MACHINE/system/correntcontrolset/services/Vxd/VNETSUP Built under a D value :EnablePlainTextpasswd, Key 1
2033 How to get network card's MAC address ( Chen Xu ,hutuworm)
arp -a | awk '{print $4}'
ifconfig eth0 | head -1 | awk '{print $5}'
2034 How to get the IP address of network card (mb)
ifconfig eth0 |awk '/inet addr/ {split($2,x,":");print x[2]}'
2035 How to modify the Linux machine where the working group (hutuworm)
vi /etc/samba/smb.conf, Modify the workgroup = line , The group name written on the back .
2036 A network card to bind two ip(linuxloveu)
#cd /etc/sysconfig/network-scripts
#cp ifcfg-eth0 ifcfg-eth0:1
#vi ifcfg-eth0:1
Modify the IP and device name
Debian The next card to bind multiple ip method (NetDC)
Modify /etc/network/interfaces
auto eth0
iface eth0 inet static
address 172.16.3.123
netmask 255.255.255.0
network 172.16.3.0
broadcast 172.16.3.255
gateway 172.16.3.1
auto eth0:1
iface eth0:1 inet static
address 10.16.3.123
netmask 255.255.0.0
network 10.16.0.0
broadcast 10.16.255.255
Modify /etc/network/ifstate
lo=lo
eth0=eth0
eth0:1=eth0:1
Then / etc / init.d / networking restart on it .
A network card bound to another multi-ip law (hotbox)
In the / etc / sysconfig / network-scripts / Create a file :ifcfg-ethX-rangeX ("X" For the card number )
File content :
IPADDR_START=<start ip>
IPADDR_END=<end ip>
CLONENUM=0
To 256 ip
2037 How to bind a ip two network cards (hutuworm)
192.168.0.88 is the assumption ip,192.168.0.1 Is the gateway :
/sbin/modprobe bonding miimon=100 mode=1
/sbin/ifdown eth0
/sbin/ifdown eth1
/sbin/ifconfig bond0 192.168.0.88
/sbin/ifenslave bond0 eth0 eth1
/sbin/route add default gw 192.168.0.1
2038 192.168.1.0/24( Pig eyelid )
It is equivalent with 192.168.1.0/255.255.255.0 , Just said in different ways ....
2039 linux Under the command clear arp table (NetDC)
#arp -d -a( For bsd)
for HOST in `arp | sed '/Address/d' | awk '{ print $1}'` ; do arp -d $HOST; done
2040 Protocol from the server using ntp time synchronization (NetDC)
ntpdate NTP-SERVER Case :ntpdate 172.16.2.1
2041 host Command usage ( Chen Xu )
host Can be used to query the domain name, it can get more information
host -t mx example.com You can check out for example.com MX Records, and handling mail The host name
host -l example.com Will return all registered domain names under the example.com
host -a example.com This will show all the host domain name information .
2042 Immediately so that LINUX support NAT(platinum)
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -I POSTROUTING -j MASQUERADE
2043 rh8.0 Set rcp usage under (zhqh1)
Related Posts of Q reproduced wonderful word linux
-
Notes Head First Design Patterns
Author: water tree reprint URL: http://mifunny.info/ Head First Design Patterns first lesson: strategy models Just look at "Head First Design Patterns", chapter I talk about a story: Joe designed the designer ducks, but the Board of Directo ...
-
eclipse project maven Management
Maven Management using Eclipse Java project Maven Management using Eclipse Java project This article can be reproduced, but please retain the original source: http://www.webwork.cn/archives/50009640.html Why should the use of Maven, there is any good use
-
CentOS 5 install ROR
1. RubyWorks installation Installation RubyWorks Repo wget [url=http://rubyworks.rubyforge.org/public_key.txt]http://rubyworks.rubyforge.org/public_key.txt[/url] sudo rpm --import public_key.txt wget [url=http://rubyworks.rubyforge.org/RubyWorks.repo]http
-
Will be installed as a Windows Service RedMine, boot automatically
Earlier used RedMine, Ruby on Rails written by ruby command-line command to start, not very convenient. Because when the system restart after automatic updates, all users will become write-off status, the user-state implementation of the command-line proc
-
CentOS 5.2 on the deployment of rails applications
Today at a newly installed server to deploy a rails small Web site, the system is Centos 5.2, the direct use of convenience of the system built-in apache and mod_rails. 1. First of all rpm -qa|grep -i ruby The system comes with the ruby version is 1.8.5,
-
fedora8 install ror
Fedora installation of Ruby on Rails Pre-action The following are the action is for the whole process has helped, but not necessarily the way to do. 1. Modify yum server, refer to the server internal I-Shou vi / etc / yum.repos.d / fedora.repo baseur ...
-
ror get openssl error problem under redhat
For a whole day yesterday Playing with Bahrain sqlite -driven, and built my first rails of the wrong time require_frameworks': no such file to load - openssl (RuntimeError I found a line at this mistake a lot of newspapers but rarely resolved, th ...
-
Ruby Rails system calls the use of Ping
Want to use call system commands under RoR, the general exec and system and the syscall Want to use in Rails, the call ping command The most common are ruby support Ping usage is as follows: Ping contains routines to test for the reachability of remote ho
-
In the Linux platform to install and configure Ruby on Rails Detailed
ruby on rails recommend the production environment is running Linux / FreeBSD / Unix, or Unix family of operating systems, using lighttpd + FCGI solution. The following will be my Linux operating system, lighttpd + FCGI, MySQL database as an example, comp
-
jdbc even ORACLE, SQLServer2000, mysql ways
According to other people say can make a ride to one of the clear step by step, not as easy to write your own ideas! 1. Even the oracle The direct use of the oracle are provided give a jar package jdbc: oracle alone is installed, and 10g of oracle on ...












