This article is for Linux For beginners , I'm going to share some things I should know as a beginner , These contents are all my work Linux Experience of many years of development work , I believe it will be helpful for beginners . If you are Linux Old bird , Maybe you don't need to look down
Why learn Linux
As engaged in IT Working classmates , Yes Linux The system must be familiar . Now we can see it in all kinds of fields , such as , Cell phones 、 Server 、 The embedded 、 Telecommunication devices 、 Mainframe computers , And all kinds of electronic products are inseparable from Linux, It has penetrated into every aspect of the Internet world .
Including those hot technologies , Like cloud computing 、 Virtualization 、 Containers 、 Big data 、 Artificial intelligence , It's almost all based on Linux Technical , Those platform systems , E-commerce 、 Group buying 、 social contact 、 News 、 Express , They are all deployed on the server side , It's almost all based on Linux Technical .
In the world of programming ,Linux It's the mainstream , No Linux You might be out of place . If you want to get into a big company , Want to learn new technology ,Linux It must be a chopper that can't get around , Only by entering Linux The door to the system , You can become a qualified software engineer .
Most enterprise server environments are Linux System , So whether you're in the front end 、 back-end 、 Operation and maintenance 、 What kind of work in testing ,Linux It's all basic knowledge that you have to master , It's just that different types of work need to learn Linux It's just in different directions .
Experience and advice
What I share below is that I am engaged in Linux Some experience of development for many years , I believe it's right Linux Beginners can help , Of course, if there are inaccuracies , Please correct .
Make sure you build it yourself Linux The environment .Linux Systematic learning is very practical , Only learning theoretical knowledge can't really master Linux Of . I recommend installing virtual machines on personal computers , The way virtual machines work is very flexible , Both can be provided Linux The environment , It will not affect the normal use of the host . The choice of virtual machine software , Consider using VMware or VirtualBox . The snapshot function of virtual machine must be used well , Especially for beginners , It can restore the environment you accidentally damaged to the initial state , It's like re installing the operating system , From then on, mom didn't have to worry about me any more rm -rf /* 了 .
Linux The choice of distribution . Because of Linux The power of , There are too many releases out there , Some students may have some tangles in their choices . Here I recommend choosing to use CentOS Just go , Because it's free and stable , The most used server of domestic enterprises is CentOS 了 , Use and RedHat There is little difference . Of course, you can choose Ubuntu System , The share of domestic servers is only second to CentOS. In fact, all distributions are based on Linux The core , It's just an extension of the relevant system components and software library , In essence Linux System , Learned to CentOS After that, it's easy to use other versions of the system , So there's no need to pay too much attention to this issue .
Be sure to use the command line . Most beginners often like to install graphical desktop , Because we used to win or mac Graphic operation of . But I strongly recommend , Do not install the desktop when installing the system , I always use the command line in my daily operation and study . It may be painful in the early stage of study , But through the throes , After skillful use , You can enjoy the power of the command line . The command line is not only powerful , And it can greatly improve efficiency , Because the command line means automation , Automation can release a lot of repetitive work for you , Let you have enough time to learn more valuable knowledge . in addition , The GUI is in linux The system exists as an independent software , Will consume additional server resources , Enterprise servers will not install graphics , So you have to be in Linux Forget about the world windows The way of thinking .
Linux It's open source . Open source means you can view Linux Source code , We can understand the principle of system implementation from the code level , These can get you to know everything 、 The effect of enlightening others , Instead of simply using it .
Develop a good habit of being safe and rigorous . For beginners , Although most of the time they operate on virtual machines , Blessing with snapshot , We can carry out all kinds of experimental operations without scruple . But I still strongly suggest that beginners must develop good operating habits ：1. Back up important information frequently ;2. To use less root The user performs various operations ;3. It's not as fast as you can ;4. The server password should be as complex as possible , Do not use 123456 This kind of weak cipher , The server is likely to be hacked into as a broiler ;5. Do not simply record the server password on a file or U On mobile devices like disks ;6. We must be in awe of the production environment .
How to learn ？
Efficient learning methods often help you get twice the result with half the effort , Here are some of my learning experiences and methods , I hope it can help you .
We must practice more .Linux It's a very practical subject , Beginners need to type more orders , Practice and practice more . It's the same as learning other things , Most of the time, we don't have to have a thorough understanding of theoretical knowledge before we can put it into practice , It's about finding problems in practice and then learning in depth , It might be better .
Effective ways of learning . When it comes to learning styles , Everyone may learn differently . I recommend Video + Reading a Book The way , Video tutorial can help you get started quickly , Quickly understand the relevant concepts , And reading can be more comprehensive learning of specific details , It'll give you more thought , Reading can be used as a supplement and extension of video .
reflection , Summary and induction . No matter what form it takes to learn , We all need to think about every problem and concept in our study , From what、how、why Learning from three perspectives , As a problem template for learning . Learn any new technology , We all need to know the technical knowledge Application scenario , And being able to What problems to solve , Is there a similar Solutions , What's the point of this technology Advantage .
Output is an efficient way to learn . In the course of learning , An indispensable link is induction and summary , Summary is output , It could be notes in the form of documents or something . I recommend Blog , If you have conditions, you must write , Because blogging can help you more effectively 、 More systematic summary and learning . Blogging is a kind of teach In the form of , If you can make your knowledge clear on your blog , Teach people , That means you really have it . If you write a good blog, you can do it for yourself Build influence , It's also helpful for your future job search . In addition, if others learn something from your blog and feel good about it , I'll give you some praise 、 Leaving a message. 、 Appreciation , It's all about blogging and learning Positive feedback , At the same time, it can stimulate you to keep learning excited and passionate , ha-ha .
Set clear learning goals . Do anything , Only with goals can we go further , Avoid detours . We learn Linux It's the same , Need to be based on their own actual situation , Set your own learning goals . I suggest that the goal should not be too big , The time period should not be too long , Be realistic , Like making Three months My learning goals . With a goal , We need to make a detailed study plan , Go down to the list of tasks you need to complete each week . Be careful , You need to specify how to verify the results for the planned task , Like writing a blog post or notes , The most difficult thing is that the plan is actually implemented , Because Executive power It's a scarce resource .
Persistence and passion , Get positive feedback . Learning is against humanity , It's easy for most people to give up after a lot of problems .1. Reasonable learning plan and result output , Can let you continue to keep learning passion ;2. Blog 、 Discussion and communication can also get positive feedback , And that motivates you to move on ;3. Persistent study can also help you form good habits , Invisible to improve their execution , I think these gains may be far more important than specific technical knowledge .
How to solve the problem . Learning Linux When it comes to technology , Beginners are bound to meet all kinds of challenges strange The problem of , In the face of these problems , We need to learn to analyze error information , Try to think about the technology you've learned so far and find the answer , If it can't be solved , You can use search engines , For beginners' problems , Baidu can generally solve . If it can't be solved , You can consult the experts around you , But when you ask questions , Be sure to describe the problem clearly , With a modest attitude of asking for advice .
The basic knowledge that should be learned
Linux The system involves a wide range of technical knowledge , Learners can learn according to their own actual situation , Choose the appropriate topic direction for learning , Don't blindly follow the learning route of others , It could backfire , The effect of learning is getting twice the result with half the effort , The gain is not worth the loss , So it's very important to choose a suitable learning route .
Because everyone's future work and direction are different , The contents that need to be focused on are also different , And the goal of this article is to share it with Linux Some practical experience for beginners , Therefore, the following contents simply list some of the most common and practical technologies , These are learning Linux Technical knowledge that all students of technology should know .
Learning vim. stay Linux Under the system , There's basically no editor to compete with （ Do not accept refutation ）, You just need to spend 1-2 Days to get familiar with vim The basic use of operation can be , There is no need to study all kinds of plug-in skills on those tall buildings . Need to know vim It's difficult to learn English , But once you're good at it , You'll be handy , It can greatly improve editing efficiency . Here is Chen Hao's 《 Concise vim Training strategy 》.
Simple file management . These are some very basic operations and file management commands , Such as ：ls、less、head、tail、du、df、ln etc. , Of course find It's a very useful command to query files , Very powerful .
Basic network management . Common network management commands , Be sure to learn to use , This is very useful for network diagnosis and network configuration when working or studying . such as ip or ifconfig Wait for the network command , And network diagnostic tools netstat、ping、traceroute etc. .
Learn something shell Instruction code programming . We know Linux One of the features is the command line , We said above , The command line means automation , After automation, it can be scaled up .shell Instruction code is the most effective way to realize automation , Because shell Programming is the best at working with Linux The core of dealing with . We can use shell Scripts help us do a lot of repetitive work , To release the hands of our engineers to create greater value .
Familiar with homework management . We often need to manage applications on command line terminals , Start or close the program . You need to know these concepts , Such as ： Program 、 Program group 、 Conversation 、 Terminal , Learn to use jobs、fg、bg、kill、Ctrl-C、Ctrl-Z, And the operation of the signal , Need to know kill -9 What are you doing .
Learn how to use package management . The most commonly used in China Linux The distribution is ubuntu、centos, Need to learn to use apt-get、yum Command to query and install related packages , Of course, you should also learn to try to install software from source code encoding and decoding .
Learn simple data processing . We often need to process text information in our work and study ,Linux There are a lot of tools available in this area , It's very convenient to realize powerful functions together . Common commands sort、uniq、cut、split, And Linux Classic three swordsman sed、awk、grep, These three tools are ancient artifacts , Very powerful ,awk There are special books to explain it , We can see the power and complexity of the function , We beginners only need to master some common functions .
Learn to read documents . Although it's not specific technical knowledge , But it's very important , Beginners always want to remember all the arguments and options when learning commands , In fact, we don't need to remember these arguments （ The brain is used to think, not to store ）, We can go through Linux Manual to view , Usually use man ifconfig You can view the official document of the order , It's accurate and clear . Of course, when it comes to problems , You can also check the manual to see if the command is used correctly .
Linux The technical knowledge involved in the system is very complex , What I share above is just some basic knowledge that I must learn , If you can study hard and master it well , It's basically an introduction Linux（ The level of survival ）. If you are the direction of operation and maintenance , At least we need to learn more ： User management 、 Disk management 、 Daily management of the system 、 The construction of common services 、 High availability clustering 、 System monitoring and other operation and maintenance knowledge ; If you're a backstage Developer , At least we need to learn more Linux The operating system 、 Procedure and thread 、 Inter program communication 、 signal 、 Network programming 、 System call 、Linux Core knowledge ; If you're embedded , You need to at least delve into Linux Core primitives 、 The device driver is running .
That's the end of this article , It will be updated later Linux Series articles , The content and style of the article will be as easy to understand as possible 、 Emphasis on practice and practicality , Help students in need as much as possible , If you're interested , You can continue to focus on the follow-up Linux Series articles .
Thank you , I'm Chopin , Welcome to follow-up wonderful sharing .