海之星科技
HY-STAR
專業電源IC供應 ⇒ DC-DC 降壓轉換器, DC-DC 升壓轉換器,LED 驅動 IC,MOSFETs / IGBTs
All rights reserved, please indicate the source when citing
Get to know Linux
1.0 The Story of UNIX/Linux
UNIX
GNU
Linux
1.1 The Attitude of Learning Linux
1.2 Linux Has Entered the Homes of Ordinary People
1.3 Understanding Linux Distributions
Installing Linux/Choosing the Right Learning Environment
Bare Metal Installation
Virtual Machine Installation
Utilizing a Hard Drive Enclosure
^ back on top ^
Understanding the Linux Command-Line Interface (CLI)
1.0 Introduction to Shell
Logging into the command-line interface
Superuser (root)
Linux command syntax
Control keys in the CLI
<Ctrl+Alt+F(1~7)> Switching terminals
<↑>, <↓> History search
Reviewing command history with the "history" command
<!> Specifying command numbe
<Ctrl+C> Stopping current operation
<Ctrl+D> Logging out or ending a file
<Tab> Autocompletion
<Ctrl+R> History search + autocompletion
Input Control
<Ctrl+U> Deleting the entire line
<Ctrl+W> Deleting input before the cursor
<Ctrl+K> Deleting input after the cursorr
<Ctrl+L> Clearing the screen above the cursor
1.1 Logging out
logout : Log out
exit : Exit the current shell
su : Temporarily change user
1.2 Shutdown
poweroff : Shut down
halt : Shut down
reboot : Restart
shutdown : Shut down
sync : Synchronize buffer memory and hard disk
runlevel : Check the current run leve
init : Execute run level
1.3 Clearing the screen
clear : Clear the screen
reset : Reset the screen
1.4 Auxiliary documentation
man : Command manuall
info : Command manuall
--help : Command's built-in help
^ back on top ^
1.0 Directories and Paths in Linux
Directory Operations
pwd : Display working directory
tree : Display directory tree
cd : Change directory
Absolute paths
Relative paths
mkdir : Create directory
/tmp directory
rmdir: Remove directory
1.1 File-related Commands
file : Identify file type
ls : List files
File Types
Linux Timestamps
atime
ctime
mtime
alias : Command alias
stat : Display file attributes
1.2 File Retrieval
cat: Read file
head : Read the beginning of a file
tail : Read the end of a file
tac : Reverse read
od : Octal output
Nnewline
unix2dos : UNIX to DOS format
dos2unix : DOS to UNIX format
echo : Display text
more : Paging file viewer (scroll down)
less : Paging file viewer (scroll up/down)
^ back on top ^
Pipes/Redirections
1.0 Pipes & Redirections
Pipes
Redirections
"1>" or ">" : Standard Output Redirection
"1>>" or ">>" : Standard Output Append Redirection
"2>" : Standard Error Output Redirect
/dev/null : Bottomless pit
"2>>" : STDERR Append Redirection
"0<" or "<" : Standard Input (STDIN) Redirection
"-" : STDIN
"2>&1" or &>" : STDERR Redirects STDOUT
"1>&2" : ST DOUT Redirected STDERR
"<< Delimmiter" : End Input
tee T-Shaped Pipeline
1.1 Instruction Return Value & Instruction Execution Flow
"&&" : Return Value is 0 Execute
"||" : Return Value Execute for ≠0
^ back on top ^
File Operations
Basic File Operations
Link Files
Symbolic Link
Hard Link
ln : Create File Link
cp : File Copy
rm : File Delete
mv : File Move
"\ " : Escape Character
^ back on top ^
Linux Wildcards
1.0 Wildcards
"?" : Matches any single character
"*" : Matches zero or more characters of any length
"{PATTERN 1,PATTEN 2,..,PAATER n}" : Expands to multiple patterns
"[ ]" : Specifies a character set to match against
"[ - ]" : Specifies a range of characters to match
"[^ ]" or "[!]" : Performs negation or inverse matching
POSIX Character
1.1 rename : Renaming Multiple Files
^ back on top ^
File Ownership and Permissions
1.0 File Owners and Permissions
Ownership
Permissions
Directory Permissions
Special Permissions
Sticky Bit
SGID (Set Group ID bit)
SUID (Set User ID Bit)
chmod : Change File Permissions
Numeric Representation
Symbolic Representation
Symlink Permissions
umask: Change Default File Permissions
1.1 File Attributes
chattr : Change File Attributes
lsattr : Display File Attributes
^ back on top ^
vi Editor
1.0 Understanding vi
Basic operations in vi
Modes of operation in vi
1.1 Normal Mode
Arrow keys
Quick cursor movement
Bookmarks
Scrolling
Replace a character
Deletion
Joining lines
Indentation
Searching
Copying/Pasting
Undo
Repeat the previous action
Save and exit vi
1.2 Insert Mode
1.3 Command Mode
Introduction to ex line editor
Line editing
Deleting, copying, and moving
Saving, exiting
Searching
Replacing
Executing Shell Commands
Deleting bookmarks
1.4 Editing multiple files
Loading files
Switching between files
1.5 Visual Block Mode
1.6 Split windows
1.7 Environment configuration
1.8 nput control characters and arbitrary characters
^ back on top ^
File Compression
1.0 Introduction to File Compression
1.1 Common Compressed File Formats
gz Files
gzip : Compress/Decompress .gz files
gunzip : Decompress gz files
zcat : Read gz Compressed files
.bz2 Files
bzip2 : Compress/Decompress .bz2 files
bunzip2 : Decompress .bz2 files
bzcat : Reads bz2 compressed files
bzip2recover : Recovers data from damaged bz2 files
.xz Files
xz : Compress/Decompress .xz files
unxz Decompress xz files
xzcat: Read xz Compressed filess
.Z Files
compress Compress/Decompress .Z files
uncompress Decompress .Z files
.zip files
zip : Compress files into zip format
unzip : Decompress zip files
zipinfo : Lists information about zip files
1.2 File Archiving
.tar Files
tarball A Compressed tar Files
tar : Archives/Extracts files from a tar file
tar bomb
^ back on top ^
File Search in Linux
File Search
type : Display command type
which : Find executable files
whereis : Find files in default paths
llocate : Search through on the hard drive
updatedb : Update the database of indexed files
find: The ultimate file search tool