One sentence question and answer (network unrelated article + network related articles)

xiaoxiao2021-03-06  116

One sentence question and answer (network unrelated article network related articles)

--------------------------------------------- -------

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

Automatic problem of redhat

Find patch at www.redhat.com/corp/support/errata / 6.1 later with a work

With UP2DATE, it can measure which RPM packets need to be upgraded, and then automatically download from the Redhat site and complete the installation.

0004

WINDOWS under the Linux partition software

Paragon.ext2fs.Anywhere.2.5.rar and explore2fs-1.00-pre4.zip

0005 0005

mount usage

FAT32 partition mount -o codepage = 936, octharset = 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 delete file names for any file name through 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 setting roller mouse

After entering X, select the configuration of the mouse, select Wheel Mouse (PS / 2).

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

The newly compiled GCC, the standard connection library used is under / usr / local / lib, but how the default connection path used is / usr / lib added? (Sakulagi) (Sakulagi) in addition to each compile

Export LD_Library_Path = $ LD_LIBRARY_PATH: / USR / LOCAL / LIB

Write ~ / .bash_profile.

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, ROOT: and next: The previous content is removed,

The first line will be similar to

root :: ......

save

4. #Reboot restart, the root password is empty

II. GRUB1. When the GRUB screen appears, use the top button to select the one you usually start "Don't choose DOS 哟), then press the E key.

2. Use the up and down button to select the one you usually start in LINUX (similar to kernel /boot/vmlinuz-2.4.18-14 ROOT = Label = /), then press E to

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, ROOT: and next: The previous content is removed,

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

GCC abc.c gets A.out can't run

./a.out

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

0023

Remove extra carriage return

Sed 's / ^ m //' Test.sh> back.sh, pay attention to ^ m is a knocking Ctrl_v Ctrl-M or Dos2Unix FileName

0024

Switch X Desktop (LNX3000)

SwitchDesk KDE or SwitchDesk Gnome

0025

Universal sound card driver (LNX3000)

OSS

Www.opensound.com/ ALSA

Www.alsa-project.org/

0026

Change the system language / character set (BEMING)

Modify / etc / sysconfig / i18n file, such as

Lagn = "en_us", xwindow will display the English interface,

LAGN = "zh_cn.gb18030", XWindow will display the Chinese interface.

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

--------------------------------------------- -------

0001

Let Apache's default character set to Chinese

Find AddDefaultCharset ISO8859-1, change to Adddefaultcharset GB2312

0002

Permanently change IP

IFConfig Eth0 new IP

Then edit / etc / sysconfig / network-scripts / ifcfg-eth0, modify IP

0003

Windows desktop remotely displayed from Linux (LNX3000)

Install RDESKTOP package

0004

Manually add a default gateway

Execute: 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

0005 0005

Redhat 8.0 MSN and QQ

Download Gaim version 0.58:

Www.linuxsir.org/gaim/gaim-0.58-2.i386.rpm

Download QQ plugin for GCC2.9:

www.linuxsir.org/gaim/libqq-0.0.3-ft-0.58-gcc296.so.gz

Place the downloaded file in / temp directory, then delete the GAIM already in the system, that is, in the terminal emulator: RPM-E Gaim. start installation

Open the terminal simulator and continue to perform the following command to install the Gaim version 0.58, namely:

CD / TEMP (enter the temp directory)

RPM-IVH GAIM-0.58-2.i386.rpm (installation software)

When the installation is successful, you can build a GAIM icon on the GNOME or KDE desktop.

Continue to install the QQ plugin, type the command:

Gunzip libqq-0.0.3-ft-0.58-gcc296.so.gz (unzip file)

CP libqq-0.0.3-ft-0.58-gcc296.so / usr / lib / gaim (copy plugin to the GAIM library directory)

Software settings

When you start the GAIM version 0.85, the login interface will appear. First select "Plugin", click "Load" in the Plugin dialog box, respectively

Libmsn.so and libqq-0.0.3-ft-0.58-gcc296.so file is loaded, confirmed, close. Then choose "All Accounts",

The "Add" continues to click "Add" in the account editor that appears. When you appear, we can enter your QQ or MSN number.

, The login name fills in the QQ number or MSN mailbox, the password fills in the corresponding QQ or MSN password, Alias ​​fills in their nickname, protocol selection

Corresponding QQ or MSN, other settings are by default. You can log in when all settings are complete.

0006

Isolated 22 port now

LSOF -I: 22

0007

View this machine's IP, Gateway, DNS

IP:

Log in with the root user, execute ifconfig. Where ETH0 is the first network card, LO is the default device

GATEWAY:

Log in with root users, execute netstat -rn, and the Gateway at the beginning of 0.0.0.0 is the default gateway

You can also view the / etc / sysconfig / network file, with the specified address!

DNS:

More /etc/reslov.conf, the content is specified as follows:

Nameserver 202.96.69.38

Nameserver 202.96.64.38

0008

RH8.0 command line easily changing the TTL value (CGWeb)

#nsysctl -w net.ipv4.ip_default_ttl = n

(N = 0 ~ 255), if n> 255, TTL = 0

0009

RH8.0 command line easily change the system configuration default value (Houaq)

Edit /etc/sysctl.conf, for example,

Net.IPv4.ip_forward = 0

Become

Net.IPv4.ip_forward = 1

After the restart, take effect, use sysctl -a to seek know

0010

Directory for other Windows machines on the Mount LAN

Mount -t smbfs -o uname = guest, password = guest // machine / path / mnt / cdrom

0011

Allow | No root is logged in through SSH (Fun-FreeBSD)

Modify SSHD_CONFIG: PermitRootLogin No | YES

0012

Let root login directly Telnet

Edit /etc/pam.d/login, remove

Auth Required /Lib/security/pam_securetty.so this sentence

0013

ADSL device in Linux

Need a normal Linux at least one network card broadband device has been applied, and it has been opened

There are about several ADSL devices in the front market, and they have some subtle differences in the way.

This process of completing the Internet through virtual dialing, that is, using the PPPoE device for virtual dialing.

It is called a full-time cat, which is an automatic dialing work after power-on, then left to our interface is RJ45.

The gateway that is generally left to our Dalian area is 10.0.0.2, which is the easiest to deal with it, and finally directly distribute

Give the user a fixed IP, relatively easy to deal with

1. The first need is required to dial:

These devices communicate with the computer via the ETH interface, so the connection of the hardware device is first, especially

It is a broadband cat, must be confirmed correctly (otherwise, don't you do something for a while)

Then start the system, confirm whether the software is installed on the system (check it through rpm -qa | grep pppoe

Find), if there is no installed user, in the disc or go online to Down, after installing, ROOT users

Perform ADSL-SETUP, so that the setting status of the ADSL data is entered, requiring the user name to apply for a broadband.

And some other information, confirm that there is no problem, accept until the end (it is E text, but you can understand,

Simple, about a firewall setting, I usually don't use, choose 0, you can consider it.

After the configuration is complete, execute ADSL-START with root users, which will make ADSL dial-up work, will normal.

Online, if there is any specific problem, let's take a look at the log (/ var / log / messages) telling you what.

Stop ADSL and execute ADSL-STOP (very simple)

2. The other two are easier to deal with:

Full-time cat: Just set your network card's IP to an IP of a 10-network segment, then the gateway refers to the IP of the whole point of cat

(10.0.0.2), basically no big problem

Fixed IP: Like a network card configured, you can get IP, gateway, and DNs can be done.

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

New Post(0)