A, Linux Basics, installation, directory, partition, order, authority, network

Introduction to Linux systems, it supports 32 and 64-bit hardware, high security, multi-user, multi-tasking, less consumption of resources, stable and free.

  1. Linux is commonly used version: Redhat (Red Hat) and Centos, www.redhat.com www.centos.org

  2. Installing Linux system in three ways: U disk (floppy disk through), DVD, batch installation tool Kicksrart;

  3. Partition: Enterprise Linux server partition standard (300G 16G), was divided into four zones, promoter / boot 200m, the root partition / 70G, swap / swap 16G, the data area / data remaining space;

  4. Boot process is ah, a.bios POST, b. Loading the kernel / boot, c. Start the initialization / sbin / init, d. Read / etc / inittab run level, e. The /etc/rc.d /rcN.d boot loader program, f. user login (ssh, command line, graphical), g. to enter the login shell, the command line as an example, first read / etc / profile configuration file, h.non-ligon patterning into the shell, a new terminal.

5. directory: / root directory, / root root user's home directory, / home general user's home directory, user data stored in their home directory, / usr storage applications, command files, libraries, manuals and other documentation , / bin to store the necessary command, / boot storage and kernel files needed to start, / dev storage device file, / etc storage system configuration file, / lib to store the necessary runtime, / mnt temporary storage mapping file system, usually use to mount, / proc memory storage process and system information, / sbin storage system management program, / tmp temporary files, / var default log storage directory;

6.Linux commonly used commands: cd / home into the home directory, ls ./ view the current directory of all files and directories, ls -a view all files, including hidden files, pwd displays the current directory where, mkdir / test create test directory, rmdir / test delete test directory, rm -rf test.txt delete test file, cp test.txt /tmp/new.txt copy test tmp file to the following directory, mv old.txt new.txt rename or move files or directory, touch creates the file touch test.txt, Useradd create user Useradd wugk, userdel delete users, groupadd create groups, groupadd wugk, groupdel delete the group find find files and directories find / home -name "test.txt" vi three mode: lnsert (shortcut key) text input mode, esc (shortcut) and enter the command line mode: wq to save and exit line mode, cat view the file contents cat test.txt, more tab to see cat test.txt | more, echo echo echo "hello word" appears hello word, echo ok> test.txt test.txt represent the ok characters covering the content, "two greater-than symbol indicates that additional, echo ok >> test.txt, Ok show additional characters to the test.txt file, do not overwrite the original file content.

  1. Linux user rights: in the system, through the UID to distinguish user's permission levels, UID equal to 0, means that the user has the highest authority, that is, administrators, other users in order to increase. Permissions for each file or directory, contains a user rights, privileges a group of other people's rights;
    as follows:
    [root @ test] the -l test.txt LS #
    -rw-r - r-- 1 root root 0 may 7 20:21 monitor_log.sh
    from the left represents a first root root, root root refers to the second group of other users where the default is not marked;
    each has four linux file permissions: read (r ), write (w), executable (x) and no authority (-).
    In order to more simple and quick to use and familiar rights, permissions rwx represented by the figures, denoted as R & lt (. 4), W (2), X (. 1).
    Monitor_log.sh privileges may represent chmod 644 monitor_log.sh.

  2. Linux network configuration
    view network IP address of the command: ifconfig
    file to configure the network card in cd / etc / sysconfig / network- scripts /
    Enter Enter ls, is displayed as shown
    A, Linux Basics, installation, directory, partition, order, authority, network
    in ifcfg-ens32 see here is the first piece of card, can enter the cat first check network configuration details
    A, Linux Basics, installation, directory, partition, order, authority, network
    if you need to modify network information, enter vi ifcfg-ens32 enter to edit the content NIC
    NIC arguments detailed as follows
    dEVICE = ens32 # physical device name
    ONBOOT = yes # [yes | no ] ( to restart the network card is activated equipment )
    BOOTPROTO static # = [dhcp | static | none] understood as a personal card mode
    tYPE = Ethernet # card type
    IPADDR = 192.168.101.72 #IP address
    NETMASK = 255.255.255.0 # subnet mask
    GATEWAY = 192.168.101.254 # card address

    设置完网卡配置信息需要重新启动网络服务
    systemctl restart network.service
    
    好了,这也是我学习流程,建议大家可以观看吴光科老师的视频,个人感觉不错,有不对的地方,大家欢迎指正。

Guess you like

Origin blog.51cto.com/11998898/2468323