Linux Fundamentals 1

Source: Internet
Author: User

This article is used to record learning notes for learning Linux

1 User Login

Root User: The permissions are very large, the system is a big threat, generally without the root user login.

General users: Permissions are relatively small and more secure.


2 Terminal

The device that the user interacts with the server is divided into physical terminal and virtual terminal.

Physical Terminal: path in/dev/console

Virtual Terminal: attached to the physical terminal to be implemented in software mode.


Related commands:

TTY: Displays the current login terminal.

Who: View all the endpoints that are already logged in.

WHOAMI: View the logged-on user for the current terminal.

Who am I: View details of the current login terminal.

CTRL+ALT+F1: Switch to graphics terminal (do not close other terminals)

CTRL+ALT+F2-F6: Switch to character terminal (do not close other terminals)

chvt+ Number: Switch Virtual terminal.

Init 3: Switch to the character terminal, the graphics terminal will be closed.

Init 5: Switching to the graphics terminal will turn off the character terminal.


3 Installing the VMware Tools tool:

Cd/media/vmware tools/switch into directory

LS view file list, green is executable file, red is compressed file.

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/84/85/wKiom1eS2gWBZSP2AAA65gWtxtY065.png-wh_500x0-wm_3 -wmp_4-s_43092029.png "title=" ls picture. png "alt=" wkiom1es2gwbzsp2aaa65gwtxty065.png-wh_50 "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/84/85/wKiom1eS2hfAhCbiAABfD3OLW6s631.png "title=" Ls2.png "alt=" Wkiom1es2hfahcbiaabfd3olw6s631.png "/>

Tar xvf ... Unzip the file

Perform installation: .../vmware-tools-distrib/vmware-install.pl D

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/84/85/wKiom1eS2q7S9FmAAACdBXJ2AcI483.png "title=" 3.png " alt= "Wkiom1es2q7s9fmaaacdbxj2aci483.png"/>

Installation is successful!


4 Shell :

The command interpreter, which translates the user's commands into binary to the computer. Divided into:sh,csh,tcsh,ksh,bash Shell.

PS1: Can be used to define the prompt format, which is a variable that can be modified temporarily.

Ps1=xxx, you can give the new value.


5 commands

commands are divided into internal commands and external commands. The execution of the command is: the kernel first determine whether the command is internal command, if it is, immediately execute, if the external command, then in the $path variable to find the command, found the immediate execution, if not found to the error.

command format: command + options + parameters

After the external command executes, it is automatically saved to memory so that the command execution speed can be accelerated the next time the command is executed. Can be viewed through the command hash , or can be deleted by the hash-d command.

Which: only the path of the binary program is searched, only in the directory of the path variable.

Whereis: can also search for external commands, not only to search commands, but also to search for help documents.


6 Install screen:

Prerequisites: The same account is logged on to the same Linux system.

Caller:screen-s needhelp

Helper:screen-ls View Help objects

Screen-x Needhelp Join session

Screen command:

Screen-s [Session] opens a new session.

Screen-x [Session] join session.

Exit and close screen:exit.

Peel current screen : ctrl+a,d

Displays the screen that is currently open: screen-ls

Restore a screen :screen-r [Session]


7 Simple commands

Date: Displays the system time

Date-u: Show GMT

Clock: View hardware time

Clock-s: Change the system time to hardware time

Clock-w: Change physical time to system time

Cal: Displays the calendar, which displays the current month calendar by default

Cal+ year: Displays the calendar for a year.

Echo: Displays the specified string, the default line break.

Echo-n: Cancel default line break

ECHO-E: Identify certain special functions \c do not wrap \a alarm \b backspace \ n line break \ r The cursor moves to the beginning of the line, no newline \ t separates.

echo \ $PATH: will output $path because \ escaped.

"' , "" ,``. Three differences: "'  output AS-is. "" Identifies the variable and does not recognize the command. "Both the command and the variable can be recognized."

In Linux , let the echo command display a colored word :

echo-e "\033[Word background color ; text color m string \033[0m "

For example: Echo-e "\033[41;37m Tonyzhang \033[0m"













This article is from the "11881794" blog, please be sure to keep this source http://11891794.blog.51cto.com/11881794/1829049

Linux Fundamentals 1

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.