红联Linux门户
Linux帮助

English Linux

发布时间:2007-10-13 16:48:43来源:红联作者:Deaboot
(1) ln - Create file hard link, or soft link (symbolic link)
hard link:
ln /root/install.log x.hard
soft link:
ln -s /root/install.log x.soft

(2) shutdown - reboot the system
reboot the system now:
shutdown -r now

(3) pwd - show current working directory

(4) cd - change directory

(5) mkdir - make directory

(6) rmdir - remove directory

(7) ls - list files
list all files:
ls -al

(8) more - viewing files
view a file:
more a.txt

(9) cat - viewing files or concatenate files into one
view a file:
cat a.txt

(10) kill - raise a signal to a process
terminate a process:
kill -9 1447 (process id)
or
kill -9 %1 (sequence id)

(11) logout - login out of the system

(12) vi - text editor

(13) emacs - powerful editor & compiler

(14) cp - copy files
copy a to b:
cp a b

(15) mv - remove files
remove file:
rm a.txt

(16) echo - show information
show value of $PATH:
echo $PATH

(17) chsh - change shell

(18) who - show current users in memory

(19) date - show date and time

(20) export - create a enviroment variable
set enviroment variable:
export JM=ls
echo $JM
$JM
another way is simple:
JM=ls

(21) > - redirection to a file
save output to file:
cat a b c > d

(22) >> - append output to a file
append output to file:
cat a b c >> d

(23) & - background process operation
put work background:
gcc invinitjig.c &

(24) ps - show processes in memory

(25) fg - bring background processes forehead

(26) 1 and 2 usage - 1 stands for standard output, and 2 for standard error output
save error output:
cat notexistfile 2> err_file

save standard output:
cat existfile 1> out_file

(27) /dev/null - throw away output
throw away all output:
cat abc > /dev/null

(28) sort - sort strings

(29) du - stands for "disk usage" and shows how many blocks each file occupies under the current directory

(30) | - pipeline

(31) man - manual book
see manual of ls:
man ls

(32) info - read info doucments, stronger than man command
see info of grep:
info grep

(33) r/w/x - ownership of files: read / write / execute, left to right: owner/group/others

(34) chown - change owner of files
change owner:
chown jm filename

(35) chgrp - change group of files

(36) chmod - change file access mode
set r/w/x permission to all (owner/group/others):
chmod +x a.exe
chmod +r a.exe
chmod +w a.exe
chmod -x a.exe
chmod -r a.exe
chmod -w a.exe
specify the owner/group/others:
chmod u+r a.exe
chmod ug+r a.exe

(37) su - run a shell with substitute user and group IDs

(38) history - command history

(39) dd - Copy a file, converting and formatting according to the options

(40) alias - make alias name
eg.
alias x="ls"
x

(41) mount
(42) find
(43) grep

(44) tar - pack or unpack files

(45) netconfig - network configuration

(46) rpm - install softwares

(47) rdev - query/set image root device, RAM disk size, or video mode

(48) passwd - change password

(49) adduser - add a user

(50) userdel - delete a user

(51) umount - reverse to mount

(52) mkfs - build a Linux file system

(53) fsck - check and repair a Linux file system

(54) free - display information about free and used memory on the system

(55) makeswap - make swap

(56) swapon - swap on

(57) swapoff - swap off

(58) mknod - make block or character special files

(59) gzip - pack / unpack files

(60) crontab - scheduling jobs

(61) setterm - set terminal attributes
文章评论

共有 1 条评论

  1. gxf 于 2007-10-13 18:43:23发表:

    A good summary to shell!

    [ 本帖最后由 gxf 于 2007-10-13 18:49 编辑 ]