What do you need to learn to learn Linux

What exactly do you learn to learn Linux?

basic instructions

Often when some friends come into contact with Linux, they just want to build a website (I did the same in the early stage), but they don't think about getting to know the basics of Linux first. This is quite difficult. Although Linux desktop applications have developed rapidly, commands still have a strong vitality in Linux.

Linux is an operating system composed of command lines. The essence is in the command line. No matter what level the graphical interface develops, this principle will not change. Linux commands have many powerful functions: from simple disk operations, file access, to Production of complex multimedia images and streaming media files.

Here I will introduce the more important and most frequently used commands into several parts according to their functions in the system. Through the study of these basic commands, we can further understand the Linux system:

●安装和登录命令:login、 shutdown、 halt、 reboot 、mount、umount 、chsh
●文件处理命令:file、 mkdir、 grep、dd、 find、 mv 、ls 、diff、 cat、 ln
●系统管理相关命令: df、 top、 free、 quota 、at、 lp、 adduser、 groupadd kill、 crontab、 tar、 unzip、 gunzip 、last
●网络操作命令:ifconfig、 ip 、ping 、 netstat 、telnet、 ftp、 route、 rlogin rcp 、finger 、mail 、nslookup
●系统安全相关命令: passwd 、su、 umask 、chgrp、 chmod、chown、chattr、sudo、 pswho

Linux file system hierarchy

The file structure in the Linux system is very different from that of the window. In the Linux operating system, all files and directories are organized into an inverted tree structure starting with a root node "/", as shown in the figure below.


Among them, a directory is equivalent to a folder in Windows. The directory can store either files or other subdirectories, and the files store real information.

The top level of the file system starts from the root directory. The system uses "/" to represent the root directory. The root directory can be either a directory or a file, and each directory can contain (sub)directories. or file. This repetition can form a huge file system.

Note : The directory name or file name is case sensitive, such as ing, Img and IMG are 3 different directories or files. A complete directory or file path consists of a series of directory names, each of which is separated by a "/". For example, the full path for ing is /home/ing.

I will analyze and summarize the Linux file directory in later articles, I hope you will continue to pay attention!

Vim text editor

The vim editor is the editor that comes with Linux, and it is also the most common editor. As a beginner, you must be proficient in the usage of at least one text editor in Linux, of which the vim editor is one of them. Of course, there are more than one editor to choose from, such as Vim, emacs, pico, nano, etc. Many people have found their favorite editor.

When using Vim to edit files, there are 3 working modes, namely command mode, input mode and editing mode. These 3 working modes can be switched at will, as shown in the figure below.

master the shell

There is a saying that engaging in Linux is actually engaging in shells. You can see the importance of shells, including regular expressions, sed, awk, expect, etc.

Shell is a program written in C language, which is a bridge for users to use Linux. Shell is both a command language and a programming language. Shell programming is the same as JavaScript and php programming, as long as there is a text editor that can write code and a script interpreter that can interpret and execute.

Packing and unpacking files

In Linux, learning to pack (archive) and compress files or directories is an essential skill for every beginner.

Packing refers to the centralized storage of multiple files and directories in one file; while compression refers to the use of algorithms to process files to reduce disk space usage.

Software installation and environment configuration

There are three ways to install software in Linux, depending on the type of software you want to install.

1.源码包,后缀为.tar.gz或者tgz的,这种就需要编译安装
解压之后进入目录
./configure
make
make install
2.rpm包,以rpm为后缀的
直接
rpm -ivh 软件包名
就可以安装了
3.用yum来安装
需要先配置yum仓库,然后
yum -y install 软件名
这样就可以安装了

Forget the windows way of thinking

I believe that everyone starts playing the operating system from windows. The concept of windows is to "allow middle-aged housewives to use computers proficiently", so when we operate the windows system, we hardly need too much knowledge reserve to be able to Proficient in operating windows system.

But not for Linux system. The feature of windows is that the graphical interface design is very friendly. Although Linux system also has a graphical interface, Linux is generally shared for servers since its birth, and servers are for professionals. To maintain, generally use the command line mode of non-graphical interface to operate.

Therefore, the difference between operating the Linux system and the Windows system is relatively large. For example, in the Windows system, we generally install the system on the C drive. The Windows system has a drive letter, but Linux does not. The basic idea of ​​Linux has two points:

First, everything is a document;

Second, each software has a definite purpose.

The first one is that everything in the system boils down to one file, including commands, hardware and software devices, operating systems, processes, etc. For the operating system kernel, they are regarded as files with their own characteristics or types. .

Therefore, the Linux command introduction we will talk about later will give the file directory where the command is located. But in any case, everyone may feel uncomfortable with Linux operation due to preconceived reasons, but when you get used to it, you will fall in love with the Linux command line.

Of course, the above is only basic knowledge. If you want to use Linux to build a server, then network knowledge is also essential, such as database, firewall, ftp and so on.

The above is the entire content of this article. I hope the above content will be helpful to you. Welcome to click on the lower left corner to read the original text and visit my homepage!

Students who want to learn embedded are welcome to pay attention to the WeChat public account [Embedded Yuexiang Garden]. This public account focuses on embedded technology, including but not limited to STM32, Arduino, 51 MCU, Internet of Things, Linux and other programming study notes. , the official account contains a large number of learning resources. Welcome to pay attention, communicate and learn together, and make progress together!

In addition, reply to "Resources" to get all embedded resources; reply to "Add Group" to join the hundred-person exchange group, looking forward to everyone's attention!

Click to jump follow -> jump link
insert image description here

Guess you like

Origin blog.csdn.net/qq_45172832/article/details/124369407