Linux Common commands

Source: Internet
Author: User

Shortly before learning Python, in the Windows environment has learned to install, debugging and so on, when learning to find a lot of configuration in the Linux environment, so install a Linux system for their own learning and memo.

Body

Add user

Useradd Eros

To see if a user was created successfully

ls/home/

Change Password

passwd Eros

Add Sodu Permissions

chmod 640/etc/soduers #修改权限

Vim/etc/sudoers #编辑文件

Add Eros all= (All) all under root all= (All)

chmod sudoers #把权限修改回去

Set up a network

View IP Address

Ifconfig

Edit the/etc/sysconfig/network-scripts/ifcfg-eth0 network card profile (there may be multiple network cards, there are multiple network card profile IFCFG-ETHX)

Vim Etc/sysconfig/network-scripts/ifcfg-eth0

Edit the contents of the modified file as follows: (#号后面为注释) Device=eth0                  #对应第一张网卡 (general original file without modification) hwaddr=74:27:ea:44:df:5e     # corresponding network card MAC address (general original file without modification) type=ethernet                # (general original file without modification) uuid=354c1215-d163-4181-9e26-1c5dccc91c53    # (General original file without modification) Onboot=yes             #是否启动时运行NM_CONTROLLED =yes       # (general original file without modification) bootproto=static    #使用静态IP, Instead of being assigned by DHCP ipipaddr=192.168.4.231   #指定本机IP地址NETMASK =255.255.255.0  #指定子网掩码GATEWAY =192.168.4.1    # Specify Gateway dns1=8.8.8.8           #指定DNS

Restart Network configuration command

Service Network restart

Linux Common commands

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.