Linux terminal switch and LS, CD, date, shutdown related commands

Source: Internet
Author: User

Console Terminal: Tty1-tty6

Virtual Terminal: pts

Console Toggle Shortcut: CTRL + (SHIFT) +alt + F2-F6 (some notebooks require FN)

Switch to another terminal: Alt + F1-f6 + (Fn)

The open terminal can be viewed via the filter command: PS aux | grep pts

PS aux | grep TTY

Open a new terminal: Ctrl+shift+t

Terminal Toggle: ALT + Numeric key

Close all terminals: Alt + F4

Enlarge the terminal font: ctrl+shift+ (+ number)

Reduce the terminal font: CTRL + (-NO)

ls command

LS directory, if you do not add a directory file to view the current directory

Parameters:

LS L (LL): Show detailed information

LS A: Show hidden files

LS d: View directory (without viewing the contents)

LS h: Enhanced readability (normally ll H is used together)

CD command

#cd cut back to the user's own home directory or #cd ~

#cd cut to the previous directory

View hardware time: Hwclock

View system time: Date

Modification Time: Date s

About time display common format:

Date +%f

Date +%y-%m-%d

Date +%h:%m

Date +%h:%m:%s

Date +%t

%t tab equivalent to TAB key

For example:

[Email protected] ~]# date-s 2016-01-01

Friday, January 01, 2016 00:00:00 CST

[Email protected] ~]# date-s 12:00

Friday, January 01, 2016 12:00:00 CST

[Email protected] ~]# date +%f

2016-01-01

[Email protected] ~]# date +%y-%m-%d

2016-01-01

[Email protected] ~]# date +%h:%m

12:01

[Email protected] ~]# date +%t

12:01:39

[Email protected] ~]# date +%f%t%t

2016-01-0112:02:20

Linux See Help information

1.-h

2.--help viewing external command Help information

3. Help view Internal command assistance information

4.man View detailed Help information

For example:

[Email protected] ~]# shutdown--help

[Email protected] ~]# fdisk-h

[[email protected] ~]# man find

[[email protected] ~]# Help CD

shutdown [Options]

Shutdown r Restart (after 60 seconds) shutdown R now restart immediately

Shutdown h shutdown shutdown h now shutdown

Shutdown H + Time

[Email protected] ~]# shutdown-h +10 #10分钟之后关机

[[email protected] ~]# shutdown-h 22:00 #22:00 off

[Email protected] ~]# shutdown-r +10 #10分钟以后重启

[[email protected] ~]# shutdown-r 20:20 #20: Restart after 20 minutes

Shutdown C Cancel the pre-timer shutdown or CTRL + C

Init 0 shutdown

Poweroff shut down the machine

Reboot restart

INIT6 restart

Exit Logout

Logout

Linux terminal switch and LS, CD, date, shutdown related commands

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.