For linux novice, usually into the linux system does not know what to do, today, to give you some linux commonly used commands.
We are doing this command experimental xshell6, graphic command for everyone to do.
One, first of all when we first use of Linux xshell6 remote control, will be shown in the following figure landing shell interface:
root: shows the current system login user
localhost: indicates that the host name
~: indicates the current location - home directory .
#: Administrator on behalf of the user. ($ Indicates if the average user, as shown below).
Second, modify the host name of a favorite:
1. Switch back to the administrator user can be in administrator mode to modify
2. Modify Command + new host name: hosthomectl the SET-hostname Demo
3. Restart
4. Modify the success
Third, : analysis command line format
1, which refers to the option function commands, divided into:
short form: "-" symbol guidelines, followed by a single letter use. eg:
long format: Use the "-" sign guidelines followed by the word. EG:
2, the parameters
of the command word processing objects;
can be a filename. Directory (path) or user names, etc;
the number may be zero or more.
Four, LS list shows the contents of a directory.
As we said in Part I install linux tutorial in all file systems are attached to the corresponding directory at the root node, then we enter linux first thing to test this result, this is what we want to learn first a basic command.
Common options:
the -l: displays file details, default in bytes.
-a: Show hidden files
-A: Show hidden files, but do not show, ".." file "."
-R & lt: recursively displaying
-aR: show all files including subfolders + recursion.
-h: do the appropriate unit conversions show
-i: View file node (serial number)
five, cd to switch the working directory, the user change the working directory to another location
Absolute path: the path with the root directory is the absolute path
A relative path: relative location of
cd ..: a return path
cd ../../: an upper return path
cd ./: current path
cd ~: home directory
cd -: switching paths are sequentially performed to the cd path
six: alias set the alias, the alias mechanism simplify common, long command.
Example:
seven: du statistical directory and file space occupancy
Common options:
-a: all statistical, not just statistical directory
-h: Statistics only the total size of the final
-s: only statistics the total size of the occupied space, rather than each folders, file size
-ah: statistics total size of all files and directories size
-sh: the total size of
eight: mkdir create a new directory
mkdir: create directory
rmdir: delete the directory
-p: recursively create
-V: display information created
nine: touch creates an empty file
-c: existing files when not create
-a: just change the access time of the file
-m: just change the file modification time
-t: set their own file timestamps (. dATE hours seconds), and a, m with the use of
how to create a file with information
a:
B: creating with vim.
Ten: LN create a link file
-s: Create a soft link
-i: show inode number of the file
-v: displays the results of
hard-wired: (actually your files from the alias)
1, can only file is created, directory can not be applied, the number of hard-linked files is 2
2, the file system can not boast
3, create a hard link will increase the number of files that are linked
soft connection:
1, can be applied to directories
2, across the file system
3 will not increase the number of times connection file
number of characters 4, the size of the specified path contains
eleven: CP copy a file or directory
-r: recursive copy directories
-i: interactive display replication
-f: force replication, cover
-p : keep the source file attributes, timestamps
twelve: RM delete files or directories
-i: interactive delete
-f: delete violence
-r: recursive delete
command using a combination of
thirteen: mv move a file or directory
fourteen: Which look command / file storage directory
can help find external command file
fifteen: the findFind the file or directory
in real-time locate, precisely, to traverse specify all files in a directory to complete the look, slow to support numerous search criteria
Format: find search path to find a standard look to the future processing operation of
search path: The default is the current directory
search criteria: Default all files in the specified path
processing operations: the default is to the screen