1. Slow logon via telnet:
CD/etc
VI resolv. conf
Clear the content
2. the root user cannot log on remotely:
CD/etc
CD Pam. d
VI Login
Comment out this line
# Auth required pam_securetty.so // comment out this row
3. Mount the USB mobile hard drive
Mount the mobile hard drive.
# DF view hard drive letters in Linux
Mount/dev/sda1/mnt/USB (example)
4. How to disable the PC speaker on the Linux text interface
Remove # Before set bell-style none in/etc/inputrc, or echo "set bell-style none" >>> ~ /. Bashrc
5. Change the GUI or character interface for Linux Startup
CD/etc
VI inittab
Set ID: 5: initdefault: 5 to the default graphic interface
Change ID: 3: initdefault: 3 to indicate the character Interface
6. Restart xinetd)
/Etc/init. d/xinetd restart
7. Restart the smb service
/Etc/init. d/SMB restart
8. Configure the IP addresses that SMB can use.
CD/etc/samba
VI smb. conf
Find hosts allow = 192.168.1. 192.168.2. 127.
Modify the machines to use. Note that IP addresses are separated by commas (,).
Example:
Hosts allow = 192.168.1.110, 192.168.1.120
9. Disable restarting machines with CTRL-ALT-DELETE in the background
CD/etc/inittab
VI inittab: Find the following line in the file
# Trap CTRL-ALT-DELETE
CA: ctrlaltdel:/sbin/shutdown-T3-R now (comment out this line)
Example: # trap CTRL-ALT-DELETE
# CA: ctrlaltdel:/sbin/shutdown-T3-R now
10. Modify the Host Name
VI/etc/sysconfig/Network
Change the hostname line to hostname = Host Name
11. Restart the FTP service.
/Sbin/service vsftpd restart
12. view the boot detection hardware
Dmesg | more
13. View hard disk usage
DF-m
14. view the directory size
Du-SH dirname
15. Decompression
Tar xvfjLichuanhua.Tar.bz2
Tar xvfzLichuanhua.Tar.gz
Tar xvfzLichuanhua. Tgz
Tar xvfLichuanhua. Tar
UnzipLichuanhua. Zip
GZ
Decompress 1: gunzip filename.gz
Decompress 2: gzip-D filename.gz
Compression: gzip filename
.Tar.gz
Decompress: Tar zxvf filename.tar.gz
Compression: Tar zcvf filename.tar.gz dirname
---------------------------------------------
. Bz2
Decompress 1: Bzip2-D filename.bz2
Decompress 2: bunzip2 filename.bz2
Compression: Bzip2-Z filename
.Tar.bz2
Decompress: Tar jxvf filename.tar.bz2
Compression: Tar jcvf filename.tar.bz2 dirname
---------------------------------------------
. Bz
Extract 1: Bzip2-D filename. bz
Decompress 2: bunzip2 filename. bz
Compression: Unknown
. Tar. bz
Decompress: Tar jxvf filename.tar. bz
Compression: Unknown
---------------------------------------------
. Z
Decompress: uncompress filename. Z
Compression: compress filename
. Tar. Z
Decompress: Tar zxvf filename.tar. Z
Compression: Tar zcvf filename.tar. Z dirname
---------------------------------------------
. Tgz
Decompress: Tar zxvf filename. tgz
Compression: Unknown
. Tar. tgz
Decompress: Tar zxvf filename.tar. tgz
Compression: Tar zcvf filename.tar. tgz filename
---------------------------------------------
. Zip
Decompress: unzip filename.zip
Compression: Zip filename.zip dirname
---------------------------------------------
. Rar
Decompress: rar a filename.rar
Compression: RAR e filename.rar
RAR Please download to: http://www.rarsoft.com/download.htm!
After decompression, copy rar_static to the/usr/bin directory (Other Directories specified by the $ PATH environment variable can also be used ):
[Root @ www2 TMP] # cp rar_static/usr/bin/RAR
---------------------------------------------
. LHA
Decompress: LHA-e filename. LHA
Compression: LHA-a filename. LHA filename
Lha please: http://www.infor.kanazawa-it.ac.jp /~ Ishii/lhaunix/download!
After decompression, copy LHA to the/usr/bin directory (Other Directories specified by the $ PATH environment variable can also be used ):
[Root @ www2 TMP] # cp LHA/usr/bin/
---------------------------------------------
. Tar
. Tgz .tar.gz. Tar. Z. Tar. BZ .tar.bz2. Zip. cpio. rpm. Deb. SLP. ARJ. rar
. Ace. LHA. lzh. LZX. LZs. Arc. SDA. SFX. lnx. Zoo. Cab. kar. CPT. Pit
. Sit. Sea
Decompress: Sex x filename .*
Compression: Sex a filename. * filename
16. Display memory usage
Free-m
17. display how long the system has been running
Uptime
18. Restart the network
/Etc/init. d/network restart
19. Command for displaying post content
Dmesg
20. view the port
Netstat-
Netstat-ANP
21 .. detailed list of ports
/Etc/services
22. View physical information
Lspci
23. The installation graphical interface cannot appear. Use resolution for installation.
Linux lowres (uses the 640x480 resolution)
24. The ping command of the host is blocked. You cannot ping your host.
Echo 1>/proc/sys/NET/IPv4/icmp_echo_ignore_all
25. Delete the Oracle Installation programs and delete several directories.
/Etc/orainst. Loc/tmp/
/Etc/oratab $ oracle_base /*
26. Linux starts to the text interface (does not start the xwindows Interface)
VI/etc/inittab is in the following line
ID: 5: initdefault: change 5 in a row to 3
When xwindows is started
The text section is 3
27. Check the installed Character Set
Locale-
28. packet capture command tcpdump
For example, capture all packets received and sent by the host at 192.168.1.32.
Tcpdump host 192.168.1.32
Intercept a specific port
Tcpdump TCP port 21 host 192.168.1.32
29. Chinese support for text section
RH 9.0 built-in installation package zhcon_0.2.3_1.rh9.i386.rpm
After the installation is complete, run zhcon to support Chinese characters.
30. Check what programs are running on the port
Lsof-I: 8001
31. view Real-time logs
Tail-F/var/log/messages
32. When mount is dead
1. Fuser-M/mnt/share: Find the process of the program and kill it.
2. umount/mnt/share again
Or
Umount-F force umount
33. Enable and stop the NIC
Super User;
Ifconfig eth0 down stop
Ifconfig eth0 up startup
34. Absolute command path
. If it is not an absolute path, you can enter
(1) [root @ RedHat Linux] # whereis adduser
Adduser:/usr/sbin/adduser/usr/share/man/man8/adduser.8.gz
You can input/usr/sbin/adduser XXX in this way.
(2) or change VI/etc/profile and add the following sentence: Path = $ path:/usr/sbin:. Export path,
You can directly enter adduser
35. Enable the background talk session Function
Enable the talk function: chkconfig talk on
Conversation: Talk massky (User)
36. Do not let the monitor sleep
Setterm-blank 0
37. Customize the information displayed during User Login
Edit the information to be displayed when/etc/motd is added to logon
38. view route information
Netstat-Rn
Route-n
39. Display hardware information
Lsdev
55. display the currently loaded core modules
Lsmod
40. list all available modules of the system kernel
Modprobe-l
41. display the process number based on the process name
Pidof vsftpd
42. Read the content in reverse order
Rev file. Name
43. Customize the information displayed during User Login
Edit the information to be displayed when/etc/motd is added to logon
44. view password expiration Information
Change-l longinname
45. display the last user logged on to the system
Last
46. display the last unsuccessful logon attempt (lastb command)
If you cannot work on the system, you need to create a file: Touch/var/log/btmp, and then execute the lastb command to view the last unsuccessful logon attempt,
47. Execute an LS command in 3 seconds
Watch-N 3 ls
48. The command displays information about each user and the processes that are running in the current system.
W
49. garbled characters on the Oracle Installation Interface
Log on with an oracle user and run the following command:
Export lang = en
50. Automatic disk repair for abnormal Shutdown
Add autofsck to/etc/sysconfig:
Autofsck_def_check = Yes
Prompt = Yes
51. Query when a system has been guided recently
Who-B
52. Check the system hardware type
Uname-m
53. Check the CPU TYPE OF THE SYSTEM
Uname-P
54. Check the OS Version Number
Uname-R
55. Modify the TTL value of Ping (rh9)
Modify the value of the/proc/sys/NET/IPv4/ip_default_ttl file (64 by default)
For example, I changed the TTL to 128.
# Echo 128>/proc/sys/NET/IPv4/ip_default_ttl
56. Use up to 23 virtual consoles
Suppose there are six files, which are added in the format of/etc/inittab.
8: 2345: respawn:/sbin/mingetty tty8
10: 2345: respawn:/sbin/mingetty tty10
24: 2345: respawn:/sbin/mingetty tty24
Skip vt7 because X uses this terminal. Then telinit Q is used to reload the configuration file. Use left Alt + FN to switch between 1-6 and 8-12 parts, and use right Alt + FN to switch between 13-24 parts