Linux Learning Notes (2) Linux Learning Considerations

Source: Internet
Author: User

1 Considerations for Learning Linux

①linux strictly case-sensitive

All content in ②linux is saved as a file , including hardware, such as hardware files/deb/sd[a-p]

③linux does not differentiate file types by extension , but some files contain extensions for easy differentiation

④linux All storage devices must be mounted (mount) before they can be used , including hard drives, USB drives, and discs

2 Server Management and maintenance recommendations (1) The role of directories under Linux

1)/bin/-----The directory where the system commands are stored, which can be performed by both ordinary users and super users . However, commands placed under/bin can also be executed in single-user mode

2)/sbin/-----Save commands related to System environment settings, only Superuser can use these commands for system environment configuration , but some commands can allow normal users to view

3)/usr/bin/-----The directory where the system commands are stored, which can be performed by both ordinary users and super users. These commands are not related to system boot and cannot be performed in single-user mode

4)/usr/sbin/-----to store the root file system unnecessary system administration commands, such as most service programs. Only super users can use it.

It can be noted that all commands saved in the "Sbin" directory are available only to Superuser, and commands saved in the "bin" directory are available to all users

5)/boot/-----System startup directory, save startup startup related files , such as kernel files and boot boot program (GRUB) files, etc.

6)/dev/-----Device File save location. This directory is used to save all hardware device files

7)/etc/-----The location where the configuration file is saved. all the configuration files in the system with the default installation (RPM installation) services are all stored in this directory, such as user accounts and Passwords , service startup scripts, common service profiles, etc.

8)/home/----- The home directory of ordinary users . Each user is created with a default login location, which is the user's home directory. The home directory for all ordinary users is the creation of a directory with the same user name under/home, such as the user User1 family directory is/home/user1

9)/lib/-----system call Function library save location

/lost+found/-----When the system crashes unexpectedly or the machine unexpectedly goes down, and some file fragments are placed here. When the system starts, the Fsck tool checks here and repairs the corrupted file system. This directory only appears in each partition. For example,/lost+found is the root partition of the backup recovery directory,/boot/lost+found is the/boot partition backup Recovery directory

One)/media/-----mount directory. System recommendations are used to mount media devices , such as floppy disks and discs

/mnt/-----mount directory. Earlier Linux had only this mount directory, not broken down. Now this directory system is recommended to mount additional devices, such as USB flash drives, mobile hard disks or other operating system partitions .

/misc/-----Mount directory. The system recommends a shared directory to mount the NFS service.

/opt/----- A third-party installed software save location . This directory is where other software is placed and installed, manually installed source code package software can be installed in this directory. However, it is more customary to place the software in the/usr/local/directory, which means that the/usr/local/directory can also be used to install software .

/proc/-----Virtual file system, the data in this directory is not saved to the hard disk, but stored in memory , mainly to save the system's kernel, process, external device status or network status lights. if the/proc/cpuinfo is to save the CPU information,/proc/devices is to save the device driver list,/proc/filesystems is to save the file system list,/proc/net/is to save the network protocol information .

/sys/----Virtual file system. Similar to the/proc directory, is stored in memory, mainly for the preservation of kernel-related information

/root/-----The home directory for super users.

/srv/-----Service Data Catalog. After some system services are started, you can save the required data in this directory

/tmp/-----Temp directory. The directory where the system holds temporary files that all users can access and write to. It is recommended that important data not be saved in this directory, preferably emptied at each boot

/usr/-----System software Resources directory. is the abbreviation of "Unix software Resource", so it is not to store user data, but to store the directory of system software resources. Most of the software installed in the system is stored here

/var/-----Dynamic Data Save location, mainly save the cache, log and the files generated by the software run

(2) Server considerations

1) The remote server does not allow shutdown and can only be restarted .

2) The service should be turned off during restart, reducing the risk of downtime .

3) do not run high-load commands at peak server access, such as large data lookups or compression/decompression .

4) When configuring the firewall remotely, do not kick yourself out of the server .

5) Specify a reasonable password specification and update it regularly .

6) Reasonable distribution of rights, for the user, the right can be enough .

7) regularly back up important data and logs, do not put eggs in the same basket .

Linux Learning Notes (2) Linux Learning considerations

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.