Chapter 1 Linux Basics

Chapter 1 Linux Basics

A, Linux Getting Started

1.Linux Introduction

  1. Linux pronunciation: Liniukesi
  2. Linux is an operating system, free, open source, safe, efficient, stable, high concurrency processing is very powerful , many enterprise-level projects are deployed to Linux / Unix servers running.
  3. Founder: Linus (Linus)
  4. Linux mascot: Penguin (Tux)
  5. The main Linux distributions: CentOS, Redhat; Ubuntu; Suse; Red Flag Linux
  6. At present the main operating systems: Windows, Android, on-board systems, Linux, etc.

2.Unix and Linux

  1. Unix how come?
  2. Linux how come?
  3. Linux and Unix relationship

3.Linux and Windows comparison

Two, VM and Linux (CentOS) installed

1. Install VM software

Download VM: official website to download

Slow, download the extension with the Thunder Chrome much faster (not fast ..)

  1. To modify the BIOS set to open virtual device support (F2)
  2. Click the exe file to install, are routine operations, they understand just fine

CC398-2YE9H-M8EQZ-ZQXEC-NURU2

2. to create a virtual space through VM software

  1. Create a new virtual machine
  2. Install the operating system later
  3. Choose to install the system version
  4. Select the name of the installation, location
  5. Split virtual disk into multiple files
  6. carry out
  7. Edit virtual machine settings (in accordance with the actual situation)
    1. RAM
    2. processor
    3. Network adapters (usually selected NAT)
      1. Bridge mode: IP address of the virtual machine in the same network segment (communication open, but the IP address is easy to conflict)
      2. NAT modes: Network Address Translation (IP does not conflict, Linux can access the Internet, without causing IP conflicts)
      3. Only host mode: your Linux is an independent host, you can not access the Internet

3. Install CentOS system

Download CentOS: Netease Mirror Download

  1. The top option bar - VM - Setting -CD / DVD (IDE)
  2. Use ISO image file, select the file and click OK
  3. Open this virtual machine
    1. Select Chinese
    2. Choose to create a partition:
      1. boot partition: (200m)
      2. swap partition: swap partition, system memory is not enough, and make use (2048m)
      3. Root partition using all remaining space
    3. Software options:
      1. GNOME Desktop
      2. Compatibility with legacy X Windows System
      3. Compatibility library
    4. start installation
    5. Set the root password, set the user name
    6. The installation is complete, restart
    7. Basic Settings
    8. log in

4. Use CentOS

4.1 terminal use and networking

  1. Terminal Use: Right - Open Terminal (change terminal interface: Edit - Preferences)
  2. networking:
    1. cd /etc/sysconfig/network-scripts/
    2. root su , enter the password (Administrator)
    3. vim ifcfg-ens33BOOTPROTO=static,ONBOOT=yes
    4. Click on the Edit VM - Virtual Network Editor -VMnet8-NAT settings
    5. In ifcfg-ens33 adding a few lines, the IPADDR = subnet IP NAT disposed on , NETMASK = subnet mask on NAT setting , the GATEWAY = the gateway provided on the NAT IP , the DNS1 = the gateway provided on the NAT IP
    6. (Total change at 2, add four)
    7. service network restart
    8. . 3 -C www.baidu.com of ping , the detection network has no through

4.2 vmtools of installation

  1. I found that I installed CentOS 7 build of Windows files and text each other and can copy and paste (I installed VM should be automatically installed vmtools a)

  2. Shared Folders: VM - Settings - Options - shared folder - always enabled - Add (location: Computer -mnt-hgfs)

Three, Linux directory structure

  • Root directory
    • / Bin: to store frequently used commands
    • / Sbin: storage hypervisor system administrators
    • / Home: storage of the user's home directory ordinary (sub-file with your name)
    • / Root: system administrator, root authority's user's home directory
    • / Lib: basic dynamic system boot required to connect the shared library. Almost all applications need to use these shared libraries
    • / Lost + found: the general situation is empty, the system illegal shutdown, some files will be stored
    • / etc : all systems needed for management configuration files and subdirectories
    • / usr : Many applications and user files are stored in this directory
    • / the Boot : some of the core file used to start Linux, including some connection files and image files
    • / Proc: a virtual directory, the system memory mapping, access the directory to obtain system information
    • / Srv: service abbreviation, store some data to be extracted after the server is started
    • / Sys: installed a 2.6 kernel file system emerging sysfs
    • / Tmp: temporary file storage
    • / Dev: all the hardware in the form of file storage
    • / Media : automatic equipment identification number, Linux will recognize the device mounted to this directory
    • / mnt : To allow users to temporarily mount other file systems
    • / opt: to host an additional install the software by placing directory
    • / usr / local : host to install additional software installation directory . Usually by compiling the source code of a program installed
    • / var : kept the continued expansion of the things used to be frequently modified directory on this directory. Including various log files
    • / Selinux: SELinux is a security subsystem, he can control the program can only access a particular file

Linux directories and only one with the directory /

Linux content of each directory store is planned, the file can not be prosecuted

Linux file management in the form of our equipment, so the Linux system, everything is a file

Linux directory to store various files what, there must be a recognition

In my mind to build a Linux directory tree

Fourth, the problems encountered

Under no shared file 1./mnt/hgfs/

Solution: root at a command: vmhgfs-FUSE .host: / / mnt / hgfs

Released five original articles · won praise 0 · Views 72

Guess you like

Origin blog.csdn.net/qq_41984731/article/details/104233406