Linux Virtual machine post-installation configuration and some command-letter notes

Source: Internet
Author: User
Tags disk usage

First, after the installation of the configuration

1, the font based on the terminal is equal width font such as: Dejavu Sans Mono

2. Add the current normal user to the Sudo user group
AddUser en sudo
chmod +w/etc/sudoers
Mousepad/etc/sudoers

3, edit source.list to join the domestic source
Two Select one
# #163 Source
Deb Http://mirrors.163.com/debian/jessie main Non-free contrib
Deb Http://mirrors.163.com/debian/jessie-updates main Non-free contrib
Deb Http://mirrors.163.com/debian/jessie-backports main Non-free contrib
DEB-SRC Http://mirrors.163.com/debian/jessie main Non-free contrib
DEB-SRC http://mirrors.163.com/debian/jessie-updates main Non-free contrib
DEB-SRC Http://mirrors.163.com/debian/jessie-backports main Non-free contrib
Deb Http://mirrors.163.com/debian-security/jessie/updates main Non-free contrib
DEB-SRC http://mirrors.163.com/debian-security/jessie/updates main Non-free contrib

# # zhong Ke source
Deb Http://mirrors.ustc.edu.cn/debian Jessie Main contrib Non-free
Deb-src Http://mirrors.ustc.edu.cn/debian Jessie Main contrib Non-free
Deb Http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib Non-free
DEB-SRC Http://mirrors.ustc.edu.cn/debian jessie-proposed-updates Main contrib Non-free
Deb Http://mirrors.ustc.edu.cn/debian jessie-updates main contrib Non-free
DEB-SRC Http://mirrors.ustc.edu.cn/debian jessie-updates Main contrib Non-free


Apt-get Update

4, Installation Vmtools:
(1), Installation Linux-header
Apt-get Install linux-headers-$ (uname-r)
(2), copy the installation package to the TEMP directory
(3), decompression
(4), installation

5. Install Chinese Input Method:
Apt-get Install FCITX Fcitx-pinyin

Second, the command character

1. DPKG Management software Package
sudo dpkg--install
sudo dpkg--remove
sudo dpkg--list

2. User group and user management

(1) User group

Query User Group command: cat/etc/group
Add User Group command: sudo groupadd xxx (newly added user name)
Modify User group command: sudo groupmod-n xxx new (Modify a new user name)
Delete user group command: sudo groupdel xxx

(2) User
New username command: sudo useradd-g cm520-m lovecm (lovecm for new user name)
Modify username command: sudo usermod-l xxx (for modified new username) LOVECM (original user name)
Delete user name command: sudo userdel user name
Change the user name user group ID to the primary user group ID command: sudo usermod-g root misscm20
Modify password command: sudo passwd user name
When the user name of the user group is not deleted, it is not possible to delete the user directly.
If you feel your password security is not high enough, directly enter the Change Password command passwd
You will be prompted to enter the current user's password.
3. File attributes
View All Files directory command: ls-l
Explanation of File permissions: Total 10 digits
-rw-r--r--
0123456789
0 represents the file type, 123 represents the permissions of the current user, 456 represents the permissions of the owning group, and 789 represents the permissions of the other user.
File type: the
File type;
When [d] is the directory
When [-] is the document;
If [l] is indicated as a linked document (link file);
If [b] is indicated as the device file inside the storage interface device (can be random access device);
If [C] is indicated as a serial port device inside the appliance file, such as a keyboard, mouse (one-time reading device).
Some command modifiers for permission modification: CH (chage change)
Change the owning group of the file to the root permission group: sudo chgrp root goddess
Change the user name of the file to Root:sudo chown root goddess
Permissions to modify files: chmod
1. Same user group allows it to read and write, other with no permissions: sudo chmod 740 file name
2.chmod u (user) + (join) r file or directory
G (Group)-(remove) W
O (Other) = (set) x
A (All)


4. File and Directory Management
LS: List directory
CD: Switch directories
PWD: Displays the current directory
mkdir: Create a new directory
RmDir: Delete an empty directory
CP: Copying Files or directories
RM: Remove files or directories

5, 5, view disk usage: sudo df

Linux virtual machine post-installation configuration and some command-letter 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.