Command line tips
What is Linux
The term refers to single linux linux kernel
linux operating system called GUN / linux
GUN / LINUX refers linux kernel
software + GUN organizations
Learn the history of LINUX
Open Source Father
Richard Matthew Stallman, free software spiritual leader of the
GNU Project and the Free Software Foundation (as Free Software
Foundation) founder, the famous hacker, he is writing
the GNU General Public License (GNU GPL) is the world's most widely
used free software licenses
Father of linux
in October 1991 by a named Linus
younger students Torvalds of Finland to take the lead in the development of linux
nuclear
LINUX version of the popular
Interact with the current operating system
- The default bash and interact with the system in the current operating system
- Right-click to open bash
- Applications can also choose the
- In a bash, enter the command: gnome-terminal
What is shell
- a shell is the operating system
software - It is enclosed in the outside of the linux kernel,
to provide interaction between the user and kernel
an interface - System shell commands to explain
- The output response to the reception system shell and
displays it to the screen - bash = GNU BourneAgain Shell
How to execute a command in the shell
• command must be entered after the prompt
• command input: command parameters of the target
- Parameters must not add
- The goal is not to be added
Command line prompt
[kiosk@foundation0 Desktop]$
- kiosk user running bash
- Host foundation0 bash where the short name
- @ Information Separator
- Desktop operating current default directory
- $ User identity represents the superuser prompt #
Test the following command
• date
• cal
• passwd
• ls
• cat
• more
• less
• head
• tail
• gedit
• vim
Getting Help
The Command --help •
• "[]" opt-in information
• "<>" must include the information
• "..." can be added to any number of
--help Command
• "[]" opt details
• "<>" to be added to the information
• "..." may be added to any of a plurality of
• man Command
• Space
• down keys
• U | D
• PageUp | PageDown
• G
• G
• / keyword
• q
SHELL call of history
In the current system, common shortcuts
File under LINUX
Linux system structure
• something similar to windows in a folder called directory in linux
• linux is a tree-inverted structure
• linux is the largest directory "/", the root directory
• "/" directory two directories are mostly installed in the system established during
linux directory information in two
file path
Commonly used commands on path
File management commands
• ls
• cd
• touch
• mkdir
• gedit
• cat
• head
• tail
• less
• wc
• cp
• mv
• rm
ls = list
• Show file information
• common parameters
-l long list displays file properties
-d display directory itself
-a show all files including hidden files
-R recursively display, commonly used directory
-s shows the file size in bytes
cd
• cd change directory command or switch
• Several special directory:
representatives of this layer directory
... on behalf of parent directory
- Representatives before a working directory
~ stands for "current user identity" master folder where
~ account on behalf of the user account's home folder
touch
• Create an empty file for
timestamps • You can also modify the file
• stat command to view the file timestamps
• access time being accessed
• modify the content was modified
• change file was modified
mkdir = make directory
• New directory
• common parameters
-m specifies the file permissions
-p build recursive directory
gedit = GNOME EDIT
• graphical text editor
• gedit file open the file and edit
• ctrl + s to save
• ctrl + n to open a new editing interface
• ctrl + o Open a new file
cat = concatenate files
• The standard output file
• common parameters
-b output standard line numbers, do not ignore blank lines
-n output standard line numbers, ignoring blank lines
head
• N rows before the file is displayed, the default line 10 before
the first five lines display file -n • head 5
tail
• Display the file N lines, 10 lines after default
• tail -n 3 displays the file after three lines
• 10 lines to monitor the contents of the file tail -f file
less
• tabbed browsing files
• When a file is too long to use
• / Keyword search Keyword
• q quit
• v Edit mode
wc = word counts
• statistics file
• common parameters
-c
-m
-l
-w
cp = copy
• Copy files or directories
• common parameters
-r copy directories
-p copy rights
-v displays detailed information replication process
mv = move
• moving files or directories
• Renaming
rm = remove
• Delete files or directories
• common parameters
-f forcibly removed not prompt
-r delete a directory
-d delete empty directories