In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how Linux should learn. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
First of all, I would like to make one point: learn Linux must not be high-spirited, on a whim, the so-called "impulse is the devil", this article is for those who really want to become Linux masters and want to use Linux to do things.
Secondly, the Linux operating system mainly includes two parts: the file system and common commands and techniques.
File system (file type, file structure)
1.1 File types
Normal file (regular file): a file that is generally accessed. Among the properties shown by ls-al, the first attribute is [-], for example, [- rwxrwxrwx].
Directory file (directory): this is the directory. The first attribute is [d], for example, [drwxrwxrwx].
Connection file (link): similar to the shortcut under Windows. The first attribute is [l], for example, [lrwxrwxrwx].
Device and device files (device): files related to system peripherals, storage, etc., are usually concentrated in the / dev directory. It is usually divided into two categories: block device files and character device files.
Sockets (sockets): such files are commonly used in network data connections. The first attribute is [s], which is most commonly seen in the / var/run directory.
FIFO,pipe: its main purpose is to resolve errors caused by multiple programs accessing a file at the same time. FIFO is the abbreviation of first-in-first-out (first in first out). The first attribute is [p].
1.2 File structure
/: root directory, all directories, files, devices are under /, / is the organizer of the Linux file system, but also the supreme leader.
The commands required by the / bin:bin system are located in this directory.
The kernel of / boot:Linux and the files needed to boot the system program, such as the vmlinuz initrd.img file, are located in this directory.
/ cdrom: you can hang the optical drive file system in this directory. For example: mount / dev/cdrom / cdrom
/ dev:dev is an acronym for device. This directory contains all the external devices used in linux systems.
/ etc: various configuration files and subdirectories used for system administration are stored in this directory. Network profile, file system, x system configuration file, device configuration information, setting user information, and so on.
/ home: the home directory used to store the user.
/ lib:lib is the abbreviation of library. This directory is used to store system dynamic connection shared libraries.
/ lost+found: sometimes there is a problem with the system, and a lot of files are moved to this directory, which may be repaired manually or moved to the original location.
/ mnt: this directory is generally used to store the mount directory for mounting storage devices, such as cdrom and other directories.
/ media: Mount those removable hard drives with usb interfaces (including USB drives), CD/DVD drives, and so on.
/ opt: the optional programs are mainly stored here.
/ proc: you can get system information in this directory.
/ root:Linux the home directory of the super privilege user root.
/ sbin: this directory is used to store system administrators' system management programs.
/ selinux: for some of SElinux's configuration file directories, SElinux can make linux more secure.
After / srv service starts, the data directory that needs to be accessed. For example, the web page data read by www service startup can be placed in / srv/www.
/ tmp: temporary file directory, which is used to store temporary files generated during the execution of different programs. / tmp is used to store temporary files. The / var/tmp directory is similar to this one.
/ usr
This is the directory that takes up the most hard disk space in the linux system. Many of the user's applications and files are stored in this directory.
/ usr/local: the software that is installed manually is mainly stored here.
/ usr/share: storage of things shared by the system, such as / usr/share/fonts is the font directory, / usr/share/doc and / usr/share/man help files.
/ var: it can be understood as an abbreviation for vary. Under / var, there is / var/log, which is the directory where system logs are stored. The / var/ www directory defines the directory where the Apache server site is stored; / var/lib is used to store some library files, such as MySQL, and the location of the MySQL database.
Second, common commands and skills
Here only for the general command to do some introduction, follow-up update it.
1.date: print or set the system date and time
2. Stty-a: you can view or print control characters (Ctrl-C, Ctrl-D, Ctrl-Z, etc.)
3. Passwd: print or set the system date and time (viewed with passwd-h)
4. Logout, login: login and logout commands for logging in to shell
5. Pwd: print working directory
6. More, less, head tail: display or partially display the contents of the file.
7. Lp/lpstat/cancel, lpr/lpq/lprm: print files.
8. Change file permissions: chmod ubix.
9. Delete a non-empty directory: rm-fr dir
10. Copy directory: cp-R dir
11. Fg jobid: you can put a background process on the foreground.
Ctrl-z can suspend the foreground process and then use bg jobid to have it run in the background.
Job & you can have job run directly in the background.
12. The function of kill: send a signal to a process. Eg: kill-9 sends SIG_KILL signals. The specific signal sent can be viewed through man kill.
13. The use of ps, ps-e or ps-o pid,ppid,session,tpgid, comm (where sessionid displayed by session, tpgid shows foreground process group id, and comm displays command name.
Thank you for reading! This is the end of the article on "how to learn Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.