Chapter 1 Linux Basics
Article Directory
A, Linux Getting Started
1.Linux Introduction
- Linux pronunciation: Liniukesi
- 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.
- Founder: Linus (Linus)
- Linux mascot: Penguin (Tux)
- The main Linux distributions: CentOS, Redhat; Ubuntu; Suse; Red Flag Linux
- At present the main operating systems: Windows, Android, on-board systems, Linux, etc.
2.Unix and Linux
- Unix how come?
- Linux how come?
- 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 ..)
- To modify the BIOS set to open virtual device support (F2)
- 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
- Create a new virtual machine
- Install the operating system later
- Choose to install the system version
- Select the name of the installation, location
- Split virtual disk into multiple files
- carry out
- Edit virtual machine settings (in accordance with the actual situation)
- RAM
- processor
- Network adapters (usually selected NAT)
- Bridge mode: IP address of the virtual machine in the same network segment (communication open, but the IP address is easy to conflict)
- NAT modes: Network Address Translation (IP does not conflict, Linux can access the Internet, without causing IP conflicts)
- Only host mode: your Linux is an independent host, you can not access the Internet
3. Install CentOS system
Download CentOS: Netease Mirror Download
- The top option bar - VM - Setting -CD / DVD (IDE)
- Use ISO image file, select the file and click OK
- Open this virtual machine
- Select Chinese
- Choose to create a partition:
- boot partition: (200m)
- swap partition: swap partition, system memory is not enough, and make use (2048m)
- Root partition using all remaining space
- Software options:
- GNOME Desktop
- Compatibility with legacy X Windows System
- Compatibility library
- start installation
- Set the root password, set the user name
- The installation is complete, restart
- Basic Settings
- log in
4. Use CentOS
4.1 terminal use and networking
- Terminal Use: Right - Open Terminal (change terminal interface: Edit - Preferences)
- networking:
- cd /etc/sysconfig/network-scripts/
- root su , enter the password (Administrator)
- vim ifcfg-ens33,BOOTPROTO=static,ONBOOT=yes
- Click on the Edit VM - Virtual Network Editor -VMnet8-NAT settings
- 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
- (Total change at 2, add four)
- service network restart
- . 3 -C www.baidu.com of ping , the detection network has no through
4.2 vmtools of installation
-
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)
-
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