The second day of Magedu Linux operational learning

Source: Internet
Author: User
Tags aliases echo display touch command

Echoing, Echo

Echo

echo Hello >/dve/pts/1

Open Graphical Interface init 5

Turn off the graphical interface init 3

Ctrl+alt+f1-6 characters, F7 graphical interface


CHVT Changing virtual terminals

CHVT + Digital

Software open for STARTX graphics

Poweroff CentOS 6.8 and 7.2 are normally powered off


Hostname display the name of the host

Lsb_release-a display of the CentOS version

Cat/etc/redhat-release

Cat/etc/centos-release


Nano Text Format modification


Cat/etc/issue


LSCPU Show CPU cat open who who am I I am I chvt convert virtual port Poewroff turn off power halt shut down system (6.8 even power is off, 7.2 power not off) hostname host name

Nano Document Modification init 3,5 (3 is to turn off the graphical interface, 5 is to open the graphical interface) StartX Open the software's graphical interface TTY display that port in use Ifconfig query IP address with NIC Unmane display kernel free display idle Memory DF Display Mount

Lsb_release

Echo gedit


The difference between an administrator and a normal user


Each user has a unique number UID

Administrator's uid=0 (root)

Id-u User name query user ID average user starting from 500

In Windows 500id for Admin ID admin Guest User ID 501

Ternimal Terminal Server non-essential parts

Console Console/dve/console


Switching interface

Gui

X protocol

Desktop:

Gnone (C, graphics library GTK)

KDE (c + +, graphics library GT)

XFCE (Lightweight desktop)


The instructions in the operating system are compiled by the shell into a binary instruction run by the computer

The shell is also known as the Linux command interpreter

Shell is a high-level programming language

Shell type: sh csh tcsh ksh bash GPL Zsh


echo $SHELL Show the default user's SHELL type

Different shells may not have the same syntax

Cat/etc/shells shows the type of all shells used by the current system


PS1 can define the format of a character

Echo $PS 1 shows the value of the PS1


Commands have external and internal command points

Internal command is the system comes with, external command is independent hard disk a file

Query the internal command first (then query the cache outside) and then query the external command

echo $PATH Show current variable

Sbin is the administrator to use the folder, Bin is the normal user to use the folder

Hash-d can clean up the specified cache

Hash-r can clean up all caches

CP Copy RM Delete mv move

Command followed by D to select the default


Enable-n CD

Temporarily disable the CD command

Enable CD

Enable CD command


Which for querying external commands

Type

Alias alias All files are used and modified only in memory

Ll=ls-l Display file properties

Alias LS query aliases

Unalias ls de-alias

Alias ls= ' ls--colour=auto '


/usr/bin/ls using the bypass alias from the address

\ls avoiding aliases with backslashes

' ls ' uses single quotes to avoid aliases

Where is to display file paths and help-to-use paths



The files and directories at the beginning are hidden files in Linux.

Ls-all Show all files in the current directory


Long format can only be written independently

Ls-l-H Display file format

6 does not support command completion, 7 can support the completion of the command.

Id-u ZCZX

Command option Parameters

Add \ Indicates that an unfinished instruction can be wrapped to continue

Remember to add a space between instructions, or an error will occur

Multiple lines of short command can be joined by;

Who;ls;pwd

Date Display host time

Date 072214452016.30

A few months and a few days. A few seconds

Clock Display hardware time

-S, synchronizing hardware time to host time

-W, synchronizing host time to hardware time

Cal-Show Calendar

Cal 8 2008

Displays the calendar for the year 2008 August

Cal 9 1752

Nano-text editing

Press ALT+F2 to enter instructions before version 6 Free The fish has a little fish out, and after 7 it's gone.


Screen command:

Open a new screen;

Screen-s Name

Same host and same account

Join session:

Screen-x Name

Exit and close screen:

Exit

Peel the current screen;

Ctrl+a,d

Show all screens that are already open:

Screen-ls

Restore a screen

Screen-r Name

For long-running files, opening screen before running can be resumed.

CD Mount Mount/dve/sr0/mnt

SSH 192.168.1.1 join each other's host, log in with the same account, and use screen for remote operation.


echo Display string

echo echo $USER = = Echo Root

echo "Ehco $USER" = = Echo Root

Echo ' Ehco $USER ' = = Echo $USER

Echo ' Ehco $USER ' = = root


The touch + file name generates a file, and the touch command can generate multiple files simultaneously.

41-47 are all background colors, 31-37 are font colors.

Reset resets, can solve the problem of garbled display

-N does not wrap characters at the end of the line

-E If the following character appears in the string, it is handled in particular, not as a generic literal output.



Touch f{1,2,3,4,5} Generates F1,F2,F3,F4,F5 of five files

TAB key to complete the path


Using Help directives

Whatis tells you the general consequences of the order.

Makewhatis Create an information database on the 7 version with MANDB to create an information database


View Help using the Helip + instructions method to view the use of internal commands

Man bash view the use of all internal instructions help

Command--help to view Help for external commands

LS--help See how LS is used


Man command (external command can be used)

MAN1,MAN2,MAN3 Chapter Number

Man + Chapter number + instruction query use Help for a section of the instruction

1,4,5,8. Use more

1. User commands

2: System call

3:C Library Call

4: Equipment files and special files

5: Configuration file

6: Game Files

7: Miscellaneous

8: Management class commands

Man and Info

Local Help document/usr/share/doc/


Show what year this year date +%y 2016

Date +%f 2016-7-22 Display Month Day

Date +%d 7/22/2016

Date +%s shows the number of seconds since January 1, 1970

Date +%j shows today is the first day of the year


BC Calculator Operations

2^10=1024


This article is from the "11767585" blog, please be sure to keep this source http://11777585.blog.51cto.com/11767585/1828934

Magedu Linux Operational Learning day two

Related Article

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.