Basic Ubuntu operation

Source: Internet
Author: User

Linux Installation
======================================================
Install VMware10.

Configuring the Installation Ubuntu-12.04.2-desktop-i386.iso

Set up logged in user

General operations
======================================================

Enter Terminal: CTRL+ALT+F2

Back to Desktop: Ctrl+alt+f7

Open Desktop Terminal: ctrl+alt+t

Account
---------------------------------
The root user name of Ubuntu is not activated by default
To activate the root account:
sudo passwd root

To block the root account:
sudo passwd-l root

Switch account: SU user

sudo: Temporarily assign limited root privileges to other users

Lists the commands that the current user can execute: sudo-l

File operations
---------------------------------
Back to Current user home directory: cd ~

Show previous command and result:!!

Read file: Cat file name

Overwrite write: echo "write" > File name

Write not overwrite: echo "write" >> file name

Copy file: CP Source file Destination file

Delete File: RM file name

Delete folder: Rm-r directory Name

New file: Touch xx or VI xx

New Folder: MkDir folder

Moving files: MV Source file Destination file

Rename: MV Source file Destination file

View: LS; ls-l

Find: Find

Open hidden file: ctrl+h


redirect
---------------------------------
>
is directed output to a file, if the file does not exist, create a file, if the file exists, it is emptied;

>>
This is to append the output to the destination file. If the file does not exist, create the file;

Shutdown
---------------------------------
Shut down System (1): Shutdown-h Now (save to close later)

Shutdown System (2): Init 0 (direct off)

Shut down System (3): Telinit 0

Shut down the system at a predetermined time: Shutdown-h Hours:minutes &

Cancel to shut down the system at a predetermined time: shutdown-c

Restart (1): Shutdown-r now

Restart (2): Reboot

Logout: Logout


Software Installation
---------------------------------
tar.gz: This manual installation, compilation, general operation Configure,make && make install.

Bin: Run the setup file on the line

RPM Deb: Other types


Vi
---------------------------------
Open new file: VI fileName

VI Three modes: normal mode, edit mode, Command mode:
VI Open file default to normal mode, press I to edit mode, press ESC to return to normal mode, press: Switch to command mode

Normal Mode:
Shift Left: H
Shift Right: L
Previous line: J
Next line:
Delete character: X
Delete Row: DD

Command mode:
Save:: W
Exit:: Q
Forced exit:: q!
Save exit:: Wq
Display line:: Set Nu

Edit mode:
Enter edit mode from normal mode: I

Basic Ubuntu operation

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.