1. When logging into the Linux system, the command line interface,
[[email protected] Desktop] #
Name of the directory where the user name hostname is located
There are two characters:
#: Indicates the current user entered the root user
When configuring the system, you need to use the root user
$: Indicates that the user belongs to a normal user
2. Under Linux, view the command for the IP address
# ifconfig
Similar to the ipconfig of Windows systems
3.linux basic Commands
Clean up the screen # clear
Create User # Useradd XXXX
Under the Linux system, by default, creating a user will create a user's own directory under the system directory called the user's home directory.
Typically, the Home/username user home directory can use the ~ representation
Set Password #passwd XXXXX
The above xxxxx is the user name created
Switch User #|$ su-xxxxxxxx
Note: 1.root user switch to normal user does not need to enter a password
2. Switch from normal user to root user needs to enter a password
Displays the directory where the current user is located #|$ pwd
Host name of Linux system
* View Host Name
#|$ hostname
* Set host Name
# hostname XXXXXXXX
Note: This way to set the host name, only in the current use of no problem, when the machine restarts, the host name will change
The reason for this is that the system configuration information from the Linux system is in the file
* Permanently set host name
Cento OS 6: Modifying the relevant configuration file
Cento os 7:hostnamectl set-hostname XXXXXXXX
Commands to read the contents of a file on a Linux system
Cat
Linux Editing Tools VI
#vi filename--Edit file contents
Enter edit Insert mode press the I key
Exit Insert mode Press the ESC key
Save File
First step: colon (:)
Step Two: Wq
Do not save the file
First step: colon (:)
Step Two: q!
Rebooting the system
* Turn off the machine
# Halt
* Restart
# reboot
#init 6
Remote Connection Tool
Assist us to use the system for easy operation
Four Remote connection Tools
Remote Connection 4 Features
*ip Address
* User Name
* Password
* Protocol SSH
* Remote command line
SECURECRT Remote command line
Note: When you first remotely connect to a Linux system, go to the current user's home directory
Remote FTP
File Transfer protocal
FileZilla
Remote editing tools
notepad++
UltraEdit
Remote interface Tools
Xmanage4
Mapping of host names to IP addresses
Host Name: Example xxxxxxxx
IP Address: Example 192.xxx.xxx.xxx
Configuration file
Linux system under the/etc/hosts
Win7 System in C:\windows\System32\drivers\etc\hosts
Add the following in the host file: IP address host name
Basic commands
See which files are in the current directory
LS--list
Ls-l View more information
ll last a short view of the detailed information
Ls-a Show all directories, more than LS. The. begin with the. files that begin with the. Hide file
Special Directory Identifiers
A point. : Represents the current directory
Two points: Represents the parent directory
To switch directories:
CD DirName
CD is a shorthand for change directory
Create a file
Touch xxx.xxx
such as Readme.txt
Linux-cento OS Learning Note 1