Linux Command notes

Source: Internet
Author: User

1. Use CAT/proc/devices to view the primary device ID corresponding to the currently used device.

CAT/proc/interrupts view records the interrupt number that the device is using

CAT/proc/tty/drivers can view information about all tty devices in the current system

Arm-Linux-gcc-V

2. Switch command from user to super user on the Control Platform: su-Root

 

3. Add the bin directory to the environment variable:

Export Path =/usr/local/ARM/bin: $ path

Environment variables added using this method will be lost after power loss. Therefore, you can add the above command in the last line of "/etc/bashrc.

Run echo $ path to view the environment.

 

4. mount command

Mkdir/mnt/Windows

If the format is vfat, run the Mount-T vfat/dev/hand1/mnt/Windows Command to mount the partition to Windows.

 

5. view the default running level of the system: CAT/etc/inittab

View the auto-start service after the system is started: chkconfig -- list

Stop ** service: Service ** stop (Service ** stop | start)

Set ** service to not start: chkconfig -- level n ** stop

View the list of all services and their port numbers in the system: CAT/etc/services

Change ** service port ?? : VI/etc/services, enter the insert mode, find the corresponding ** service, and change its port number ??

 

6. pop up the CD

Eject

 

7. How can I change the IP address, gateway, and DNS of a Linux Nic through the command line?

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

Set routing and mask

# Route add-net default GW 192.168.0.254 netmask 255.255.255.0

---------------------------------------------------------------------
Nic eth0 IP address changed to 102.160.1

Ifconfig eth0 102.160.1 netmask 255.255.255.0

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

Change gateway to 102.160.254

Route add default GW 102.160.254

You can also modify it in the startup file.

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

Modify DNS

Echo "nameserver 202.202.202.20">/etc/resolv. conf

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

Restart NETWORK SERVICE

/Etc/rc. d/init. d/network restrart

 

Command

# Open the Ethernet Interface

Ifconfig eth0 up/down/Restart service network up/down/restart

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

Attach Optical Drive

1. Create a cdrom directory under the MNT directory

CD/mnt

Mkdir CDROM

2. Mount the optical drive

Mount-T iso9660/dev/CDROM/mnt/CDROM

3. Uninstall the optical drive

Umount/mnt/CDROM
-----------------------------------------------------------------------

 

8. Connection command. Example:

The most common method is to create a link pointing to busybox. Different link names are used to complete different functions.

# Ln-s busybox ls

# Ln-s busybox RM

# Ln-s busybox mkdir

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.