Linux Reference notes

Source: Internet
Author: User

First, the installation of Linux system 1. Linux directory structure
/   根分区 Linux文件系统的起点        Linux系统中有且仅有一个根分区,Linux里面的所有数据全部存放在/下面/bin    普通用户使用的命令/sbin   管理员使用的命令/boot   存放启动相关的文件,内核.../root   管理员的家目录/home   普通用户的家目录/dev    存放设备相关的,硬盘,光驱,软盘,键盘.../etc    配置文件存放位置/var    存放数据,日志相关/tmp    临时文件存放位置
2. File system
概念:磁盘的格式Windows NTFS、Fat32Linux   XFS、ext2/ext3/ext4    swap 交换分区,虚拟内存 8G
3. Installation environment for new CENTOS7
双击桌面VMware Workstation Pro图标/文件/新建虚拟机/自定义,下一步/选择稍后安装操作系统,下一步/选择Linux,Red Hat Enterprise 7 64位,下一步/修改虚拟机名字CentOS7,安装位置更改D:\Virtual Machines\CentOS7,下一步/下一步/内存2048M,下一步/下一步/下一步/硬盘修改为SATA,下一步/下一步/硬盘调整为80G,下一步/下一步/完成
4. Installing CentOS7 in VMware
a.放入安装光盘    选择CD/DVD(SATA)/选择使用ISO映像文件/D:\网工软件包\软件包\ISO\CentOS-7-x86_64-Everything-1511.iso/确保上面设备状态被选中/确定b.启动虚拟机电源,选择Install CentOS 7,回车c.安装语言选择中文,简体中文,继续,键盘/选项/ctrl+shift/完成  SECURITY/关闭/完成  软件选择/GNOME/完成d.安装位置/我要配置分区/完成/选择标准分区,        点击+/挂载点选择/boot,大小200M,添加挂载点/            点击+/挂载点选择/,大小20000M,添加挂载点/                点击+/挂载点选择swap,大小8192M完成/开始安装e.点击root密码,设置密码为centos,完成/重启f.安装之后的初始化(如果文字界面):1 --> 2 --> c --> c
Ii. basic operation of Linux System 1. Account Management
Windows管理员  administratorLinux管理员    root
2. Switching between graphical desktop and command-line interface
centos7提供了 F1 - F6 6个终端环境,其中F1是图形,F2-F6是字符从图形桌面进入字符界面 Ctrl + Alt + (F2-F6)字符界面进入图形桌面  Alt + F1字符界面之间的切换   Alt + (F2-F6)
练习:1)按Ctrl + Alt + F2 切换到第二个字符控制台    在 login: 后输入 root ,按 Enter 确认    在 password: 后输入 root 用户的密码,按 Enter 键即可登陆2)按Alt + F3 切换到第三个字符控制台    在 login: 后输入 root ,按 Enter 确认    在 password: 后输入 root 用户的密码,按 Enter 键即可登陆3)输入 exit 退出第三个字符控制台4)按Alt + F1 回到图形桌面环境
3.Linux Command Basic use
pwd 打印当前工作目录,相当于windows地址栏cd      切换目录cd .        当前目录不变cd ..       返回上一级目录cd ../..    返回上一级目录的上一级cd -        返回上一次所在目录cd ~ = cd   返回当前用户的家目录ls      列出当前目录下的内容     -l     长格式显示当前目录的内容Windows下双击一个目录 = Linux里面 cd + ls
4.Linux the effect of the following color
蓝色  表示文件夹红色  压缩文件绿色  可执行文件黑色  普通文件黄色  设备文件
eg:[[email protected] ~]# cd      //[[email protected] ~]# pwd     ///root[[email protected] ~]# cd .    //[[email protected] ~]# pwd     ///root[[email protected] ~]# cd ..   //[[email protected] /]# pwd     ///[[email protected] /]# cd ..   //[[email protected] /]# pwd     ///[[email protected] /]# cd /etc/pki/CA[[email protected] CA]# pwd/etc/pki/CA[[email protected] CA]# cd ../..[[email protected] etc]# pwd/etc[[email protected] etc]# pwd/etc[[email protected] etc]# cd /root/[[email protected] ~]# pwd/root[[email protected] ~]# cd -/etc[[email protected] etc]# pwd/etc
5. Configure the Network
Ifconfig View current Network information # ifconfig# route-n View Gateway # cat/etc/resolv.conf View DNS address graphics Configure network Alt+f2nm-connection-editor upper right corner net Re-activation Verification hostnamectl-sethostname xxx.xxx.xxx[[email protected] ~]# hostnamectl[[email protected] ~]#         Hostnamectl set-hostname teacher.tedu.cn[[email protected] ~]# hostnamectl Static hostname:teacher.tedu.cn Icon NAME:COMPUTER-VM CHASSIS:VM Machine id:d3f0970c5308449d950e3453c9a449ba Boot id:c579 9a77789d47ca9a670064a03655eb virtualization:vmware Operating system:centos Linux 7 (Core) CPE OS name:cpe:/o: Centos:centos:7 kernel:linux 3.10.0-327.el7.x86_64 architecture:x86-64 Command Configure network # NMCLI Device Status column Out all NIC devices # NMCLI connection Show list configured network connections manually set IP address/mask, allow automatic connection nmcli con mod "connection name" Ipv4.method manual ipv4.address "IP address/Mask Number of yards "# nmcli connection modify eth0 ipv4.method manual ipv4.addresses" 10.0.0.10/255.255.255.0 "nmcli con mod" Connection name "Connec Tion.autoconnect yes# nmcli ConnectiOn modify eth0 connection.autoconnect Yes manually specify default gateway, DNS address # nmcli con mod "connection name" Ipv4.gateway default gateway address # NMCLI con mod "Connection name" IPV 4.dns DNS Address # NMCLI connection modify eth0 ipv4.gateway 10.0.0.254# nmcli Connection modify eth0 ipv4.dns 4.4.4.4 Disable specified connection  Connect nmcli con Down "Connection name" Activate specify connection nmcli con up "connection name" # NMCLI connection down eth0 # NMCLI connection up eth0 # ifconfig Eno16777736:flags=4163<up,broadcast,running,multicast> MTU inet 10.0.0.10 netmask 255.255.255.0 bro    Adcast 10.0.0.255 # route-nkernel IP routing tabledestination Gateway genmask Flags Metric Ref Use Iface0.0.0.0 10.0.0.254 0.0.0.0 UG 0 0 eno16777736# cat/etc/resolv.conf # Ge nerated by Networkmanagersearch Tedu.cnnameserver 4.4.4.4

Linux Reference notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.