Linux Getting Started knowledge

Source: Internet
Author: User

1. Historical outline: Unix---(Mars program)---> Minix-----(Contributions from Linus)----> Linux

2. Linux hierarchy Directory (tree): First level:/

Second level:/etc (System configuration)

/bin (storing Linux common commands)

/sbin (Storage of Linux advanced instructions, administrator-level users to use)

/lib (System binaries exist)

/root (the root of the root user, relative to the root user's home)

/Home (it is a house for users other than the root user, and each user has a directory named for himself in this room, that is, his family)

/dev (System's devices)

/tmp (temporary file storage point)

/MNT (is a manually mounted directory)

....

PS: Mount can be divided into: manual mount and automatic mount. For automatic mount, the Linux file management is supported by a file system, all the files are naturally placed on the disk, Linux using the so-called Mount way to the disk and file system directory mapping, this process is automatically mapped up the boot. However, manual mounts are required for the user to mount themselves. Then why does the system need us to mount it manually? In fact, like a U disk, HDD and other mobile storage devices, the system in the Command interface (init 3) is not automatically detected, the user needs to mount (Mount device:/dev/cdrom mount Location:/mnt).

3. Installation of the Linux installation package

Linux under the graphical interface, installation and Windows under the Software installation is not any different. I couldn't have been a lot of trouble talking about how Linux installs software in a graphical interface.

Install the software under the command line interface: Linux installation software is actually not called software installation, but self-extracting, that is, Linux under the software decompression can be run, the general use of Ls-l display the contents of the extracted directory, green file indicates the program can be run, that is, the entrance of the program.

Installation of the bin package: Test.bin------->./test.bin

tar.gz software Package Installation: test.tar.gz-------> TAR-ZXVF test.tar.gz

RPM Package Installation: test.rpm------> RPM-IVH test.rpm

.....

There are many types of packages installed under Linux, only the three most common installation packages are listed here ...

PS: Software uninstall that installs to. bin. tar.gz installation requires only the removal of the software catalog, but the uninstall of software installed to the RPM installation requires a command: RPM-E test.rpm

The RPM command also has: Rpm-u test.rpm is a manual upgrade of the test software. Rpm-qa query all RPM packages installed by this user, if you want to inquire whether a certain software is installed: Rpm-q test.rpm

Note that when you tap the name of the installation package, you do not need to enter the full file name, just enter the first few words, and then use the TAB key to complete the completion.

4. Linux command Daquan:

User Switching: Logout (exiting the current user)

SU (temporarily switch from normal user to root) exit to exit the temporary root user.

Ls-l (lists all files in the current directory as a long list the-a parameter can list files that begin with a., that is, hidden files)

DIR displays all folders under the current directory

PWD Displays the directory that is currently in

Who am I displays the current user name

Who mom likes: Displays the current user name

Groups show Current user group

passwd Modify the current user's password, if the current is the root user, you can also passwd xiaoming for the xiaoming user to set the password

mkdir folder name Create an empty folder

Touch file name to create a file

RM Delete a file or folder-F Force Delete-R Iteration Delete, that is, if the folder is deleted, use this parameter to place all the files under that folder.

MV file path New file path move file to a new directory

MV FileName A new file name renames the file under the directory

CP file path new file path to copy files

Mount Mount device Mount location mount the device

Umount mount position removes the mount of the location

StartX Open a visual desktop

chmod xxx file name or folder name sets the user rights for this file in the same group as the owner users

Usermod set permissions for this user

Useradd Root User's instructions, add user

Userdel Root User's instruction, delete user

Groupadd Root User's instructions, create a new user group

Groupdel Root User's instruction, remove a group

Env View Current Environment information

Ls-l/bin/*sh View the shell supported by the system

Chsh-s Shell type (use the instructions above to see all shells first, such as/bin/bash)

History view all before all the correct instructions, if history 10 view the last 10 articles,! 520 Execute the instruction with a sequence number of 520

Ifconfig viewing the IP of a device

Ifconfig etho 192.168.1.1 Temporary settings ip,root user use

Setup to configure the system, the root user to use

Fdisk-l Viewing partitions on disks

Df/home to see which area of the disk is mounted on the/home directory

Shutdown-h now shuts down and the root user uses

Shutdown-r now restarts, root user use

Reboot system restart

5.Linux the following common directory

/etc/profile is a system configuration file (JDK environment configuration) that takes effect for all users, and each user has a profile, which is configured in this context and is only valid for that user.

/etc/inittab Update system boot level: 0. Shutdown 1. Single User 2. Multi-user no Network 3. Multiple users have network 4. Spare, user-definable 5. Graphical user Interface 6. System restart

/etc/rc.d/init.d/network System network card file, through the/etc/rc.d/init.d/network restart to restart the network card.

  

  

Linux Getting Started knowledge

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.