Linux System Learning

Source: Internet
Author: User

Today, take some, idle to do nothing, study Linux system.

One: VM ware installation and use of virtual machines

Two: Linux (Linux is not Unix) originates from UNIX, but open source.

Three: Linux system disk partitioning

Four: Common commands:

1: File Management

Ctrl+alt: Switching between a virtual machine and windows
CTRL+G: Entering Linux input mode

PWD: View current directory

LS: Lists all directories and files in the current path
Ls-a: List all files, including hidden files
Ls-l: List files or directories for more information


CD: Switch directories

WhoAmI: View Current User

RmDir: Delete directory (no interaction), only empty directories can be deleted
RM-RF: Delete directory (recursive forced delete)

RM: Delete directory (with interactive)

mkdir: Create a directory

Mount: Create mount point

Umount: Unload mount point

Find/dev-name cdrom: Finding a directory or file
Look for a file or directory named cdrom in the dev directory

Five ESC: Show all Linux commands

Q: Exit view
CTRL + C: Exit view

--help--? Display Help information

Man: Command User manual

Touch: Create an empty file

CP: Copying Files or directories
CP 1 2: Copying files 1 to 2
Cp-r dir1 Dir2: When copying a directory, the front must be preceded by the-R, recursive operation
MV: Moving files or directories


VI Command:
VI file: File exists, direct access, file does not exist then create file, enter.
A: From the command mode to the edit mode (append);
ESC: Switch from edit mode to command mode
Q: Quit! : Do not save W: Save disk

View file: Read-only mode entry
MORE: Read files

DD: Delete a row in a file

Head-3 viewing the first 3 lines of a file
Tail-3 3 lines after viewing a file

Whereis ls:
View the command that is called after the LS is executed:


LN: Creating a link to a file

ln test.txt test: Establish links to files, hard links
Ln-s test.txt Test: Link to file, soft link (after deleting test.txt, test does not exist)

2: User Management

SU: Switching users (switch user)

Exit: Back to the original user

Useradd: Create a user
Userdel: Deleting a user
Usermod: Group Users


chmod: Changing user permissions
chmod 755 test.txt: Change the permissions of the file for the owner can read and write execution, the same group can execute, the other can read execution
chmod 777 Test.txt: Change the permissions of the file for the owner can read and write execution, the same group can read and write execution, the other can read and write execution

Chown: Changing the file owner
Chown Tester Test.txt: Change the owner of the file to tester

WC: (Word count) word counts
WC-LWC Test.txt

-L: Number of statistics file lines
-W: Count the number of words, separated by spaces
-C: Statistics byte number bytes

3: Pipeline, handing the result of the previous command to the next command execution

Paging View:
Ls-rl|more


List how many files are in a directory
Ls-l|grep ' ^-' |wc-l
List how many directories are in a directory
Ls-l|grep ' ^d ' |wc-l


Warning:
Wall ' Date ': Send information to all users

Redirect:
> >>
ls > Cmd.txt: Writes the result after LS to the Cmd.txt
LS >>cmd.txt: Writes the result of LS after the cmd.txt, executes both sides


Clear: Clear Screen
DOS: Clear screen (CLS)

Date: View the current date
Cal: View current calendar
FDISK: View disk information

PS: View the currently running process
PS-A: See all the processes

Kill-9 pid: Kills All Processes


To modify the system default boot level:
/etc Directory: Inittab file in Initleveldefault: from 5 to 3 can be.

Reboot: Rebooting the system
STARTX: Switch to the graphical user interface

Linux System Learning

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.