Linux Learning Notes [1] - before learning Linux need to know something

First contact with Linux, while studying to write this blog post, on the one hand in order to consolidate their knowledge, on the other hand would like to provide a little help to other friends just getting started. If there are errors or inaccurate content please correct me.
Benpian and series are deployed on CentOS virtual machine.

First, what is Linux?


        Linux is a free, open source, and may be freely UNIX-like operating systems.  
  Here we see can understand some of the characteristics of Linux, right? Yes, that is free, open source, free to spread ! So Linux attracted a lot of technology users join the community, and its continuous improvement. Because of its open source nature, we can also change during use them according to our custom preferences.
  But Linux is not only a feature of this, there is his system stability and security . Because stability and security, so Linux has become the first choice of companies and enterprises select the server operating system. There are cases as evidence: the modern world's top 500 supercomputers are using Linux!
  So, we choose to learn Linux, because he's free, open source, stable and secure .



 

Linux directory


And directory of the Windows operating system is not the same, Linux is in the form of a directory tree.

/
bin
sbin
etc
dev
proc
.......

/: Root directory, the entire system is the most important directories, all directories in the root directory. Only root privileges to write in this directory.



Linux users


There are two carved Linux users:

  1. root user: the administrator user of the system, with the highest authority. Prompt is #.root user
  2. Average user: lower right corner. Tips for the $.
    general user
    General recommended daily operations with ordinary users , root user privileges because too prone to misuse.


Linux interface


Linux has two interfaces, graphical interface similar to Windows, and the text interface is our impression of Linux in the past.

Graphical interface:
graphic interface
text interface:
Text interface
In Linux, we often use the text interface, graphical interface rarely used.



Linux file information


First on file to explain
在这里插入图片描述

  • Foremost -rw-rw-rw-. It refers to the file type and permissions
    1. The first character, if d represents a folder, if it is - represents a file, there are other characters, but these two are more common. The first chart below is a folder, the second is a .c file
      文件夹
      在这里插入图片描述
    2. 2-4 characters by three characters rwx. It represents the owner of the rights to the file.
      r: read, the first rwx
      w: writable second
      x: executable, the third
      corresponding positions have the proper permission will be displayed if theThe corresponding characterIf you do not have permission to display -
      Example: has read and write, no execute permissions: rw-
      have read, execute, do not write permissions: rx
    3. The first 5-7 characters of the same composition rwx. Indicate where the group permissions to the file.
    4. The last three characters represent other users permissions to the file
  • 1It refers to the number of file hard links
  • FirstrootI refer to the owner of the file
  • the secondroot It refers to the group files are located
  • The latter figure69It refers to the file size
  • Feb 29 20:07It refers to the creation time
  • hello.cIs the name of the file / folder name



Shell Commands


  • Command Prompt

[username@host ~]#
username:当前用户名。
host:主机名。
~:当前目录。
#:提示符,root用户为#,普通用户为$。
  • Command Format

$ Command [-Options] Argument1 Argument2 ......
* $:命令提示符
* Command:命令,严格区分大小写
* option:选项,可有可无
* argument:参数    

example:

[root@chenxuan TEXT1]# rm -f hello.c 
rm:删除文件或文件夹(命令)
-f:强制执行,不进行询问 (选项)
hello.c:被删除的文件(参数)


Published an original article · won praise 1 · views 27

Guess you like

Origin blog.csdn.net/qq_43730174/article/details/104718273