UbuntuLinux command line Quick Start

Source: Internet
Author: User
(1) A very easy way to access the terminal/command line Ubuntu is to access the terminal/command line through the buttons on the desktop or the "terminal" in the application. This will enable gnome-terminal. In this case, you can keep the terminal running on the GUI. This is how most Desktop Users enter the terminal. Another way to enter the terminal is to press Ctrl + Alt + F1 to enter the entire terminal system without a graphical interface. After switching to the entire terminal system, the screen

(1) how to enter the terminal/command line

In Ubuntu, a very easy way to access the command line is to use the buttons on the desktop or the "terminal" in the application to enter the terminal/command line. This will enable gnome-terminal. In this case, you can keep the terminal running on the GUI. This is how most Desktop Users enter the terminal.

Another way to enter the terminal is to press Ctrl + Alt + F1 to enter the entire terminal system without a graphical interface. After switching to the end-to-end system, the screen displays the following two lines:

Ubuntu12.04 LTS cindy-ThinkPad-X200 tty1

Cindy-ThinkPad-X200 login:

Tty1 is one of the six virtual consoles provided by Ubuntu. You can use Ctrl + Alt + (F1, F2, F3, F4, F5, F6) to switch between six virtual consoles. You can use Ctrl + Alt + F7 to return to the graphic interface. After entering the virtual console, you can also choose Alt +-> or Alt +-to switch between virtual consoles.

The preceding two methods can be used to access the console. There are minor differences, which we will mention later.

Of course, there are other methods to access the terminal. For example, you can restart the terminal or use the telnet/ssh command to link to your system.

On the virtual console interface, enter your user name, and then prompt to enter the password. Enter the password and press enter to log on to the terminal. Note that the password is not displayed for security reasons. Here we need to mention a very important command pwd. When you go back and forth in the linux directory, you may not know where you are currently in the file system. In this case, you can type pwd and the system will return your current directory.

After logging in to login, you will see a display similar to the following:

Www.linuxidc.com @ linuxidc :~ $

There is a flashing underline behind it. Here is a simple explanation: cindy is the user name, cindy-ThinkPad-X200 is the system. The current directory is the user's home directory. That is, the home/cindy directory.

(2) How to exit the terminal

To exit the terminal, run Ctrl + D or exit or logout.

(3) how to remotely log on to a Linux terminal

The safest and most effective method for remote Linux is to use Secure Shell Client (ssh). The command is as follows:

Ssh 192.168.12.34

(4) root account (regular-user account) and super user (super-user account)

In some Linux systems, there is a default account root user, and the command line prompt is "#". When you are using the root user, you can make any modifications to the system. In Ubuntu, the default value is "$". When you need to execute some system commands that may cause irreparable changes, add sudo in front of the command line to grant this normal account the superuser permission. Then, you are prompted to enter the superuser password to execute commands such as installation and uninstallation.

Of course, there are two ways to use the root user account in Ubuntu:

First, start the root account, enter sudo passwd on the terminal, and then prompt to enter the root user name and password. The root account is enabled.

The second method is not to enable the root account, but to enter the command line root prompt under the current user. You can enter sudo-I on the terminal and then the password. At this time, you can see the root user prompt (#) on the terminal (#).

(5) Introduction to Linux File System

Basic Linux directory

Name

Description

/

Root directory

/Bin

Basic commands

/Boot

LinuxKernel, restart to load files

/Dev

Device Files

/Etc

System Configuration File

/Home

User directory

/Lib

Shared Library and kernel module

/Lost + found

System Recovery file directory

/Media

Mount point of the removable media, suchDVD, Floppy disk, etc.

/Mnt

Local/General mount point of the Remote File System

/Opt

Add-onSoftware Package

/Proc

Kernel information and Process Control

/Root

Superuser (Root)Directory

/Sbin

System commands

/Srv

System Service Information

/Sys

Real-time device information used by the kernel

/Tmp

Temporary Files

/Usr

Application Software catalog

/Var

Variable data, logs, etc.

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.