-
Linux常用命令
-
Checking Your Login Session
- $ id
-
$ who -uH
- NAME LINE TIME IDLE PID COMMENT
chris tty1 Jan 13 20:57 . 2013
-
Choosing Your Shell
-
$ echo $SHELL
- Find what is the default shell
-
Checking Directories and Permissions
- $ pwd
-
$ echo $HOME
- $后面的参数为大写
- $ cd
-
Locating Commands
- $ echo $PATH
- $ type bash
bash is /bin/bash
-
Checking System Activity
- $ ps -au
- $ ps -aux | less
-
Command-Line Recall
- $ history 8
-
Connecting and Expanding Commands
-
Piping Commands
-
$ cat /etc/password | sort | less
- AS4下,为passwd目录
- $ gunzip < /usr/share/man/man1/grep.1.gz | nroff -c -man | less
-
Sequential Commands
- $ date ; troff -me verylargedocument | lpr ; date
-
Background Commands
- $ troff -me verylargedocument | lpr &
-
Expanding Commands
- $ vi $(find /home | grep xyzzy)
-
Expanding Arithmetic Expressions
- $ echo “I am $[2006 - 1957] years old.”
-
Managing Background and Foreground Processes
-
$ find /usr > /tmp/allusrfiles &
- $ fg %1
- $ bg %5
- Using Shell Environment Variables
-
Working with the Linux File System
- Files are organized within a hierarchy of directories.
-
Creating Files and Directories
- cd Change to another current working directory.
pwd Print the name of the current working directory.
mkdir Create a directory.
chmod Change the permission on a file or directory.
ls List the contents of a directory.
touch Creates empty files.
-
Using File-Matching Metacharacters
- ✦ *—Matches any number of characters.
✦ ?—Matches any one character.
✦ [...]— Matches any one of the characters between the brackets, which can include a dash-separated range of letters or numbers.
-
Using File-Redirection Metacharacters
- ✦ <—Directs the contents of a file to the command.
✦ >—Directs the output of a command to a file, deleting the existing file.
✦ >>—Directs the output of a command to a file, adding the output to the end of the existing file.
-
Understanding File Permissions
- # chmod 777 file rwxrwxrwx
# chmod 755 file rwxr-xr-x
# chmod 644 file rw-r--r-
# chmod 000 file ---------
- chmod a-w file r-xr-xr-x
chmod o-x file rwsrwsrw
chmod go-rwx file rwx------
-
Moving, Copying, and Deleting Files
- $ mv abc def
$ mv abc ~
$ cp abc def
$ cp abc ~
$ rm abc
$ rm *
- Starting with vi
-
注意
- Getting Help Using the Shell
-
GNOME及KDE桌面问题
- create a new configuration file,
-
Tuning Up Your X Configuration File
- ✦ Mouse—
- ✦ Monitor—
- ✦ Video device—
-
名词解释
-
bash shell,
- which stands for Bourne Again Shell. The name is derived from the fact that bash is compatible with the first
-
Idea
- Description
- Pros
- Cons
- Action
- Author
-
其它
- Press Ctrl+Alt+F1 (or F2, F3, F4, and so on up to F6 )