Some common basic commands:
Uname-a view kernel version
Ls-al: Display Properties of all files
Pwd displays the current path
Cd-returns the last directory cd ~ Returns the home directory.
Date s: set the time and date
Cal display calendar cal 2006
Bc Calculator
Man & info help manual
Locale displays all available fonts locale-a in the current font/etc/sysconfig/i18n setting file
LANG = en english font
Sync writes data synchronously to the hard disk
Shutdonw-h now & half & poweroff Shutdown
Reboot restart
Startx & init 5 enters the graphic interface
/Work &? Work: Search for document content up and down
Chgrp changed the archive group chgrp testing install. log
Chown changed its owner chown root: root install. log
Chmod change attribute chmod 777 install. log read = 4 write = 2 execute = 1
Cp copy cp filename
Rm delete file rm-rf filename force delete file
Rmdir Delete folder
Rename mv 123.txt 222.txt
Create a folder using mkdir
Touch file creation update current time
Cat displays cat from the first line | more pages
Nl adds a row number before the content
More & less side flip
Head-n filename: displays row N content
Tail-n filename: The last N rows of content displayed
Od display non-pure document
Df-h display partition Space
Du: displays the directory or file size.
Fdisk partition settings fdisk-l/dev/hda display hard disk partition status
Mkfs creates various file systems mkfs-t ext3/dev/ram15
Fsck checks and fixes LINUX Files
Ln hard link ln-s software Link
Whereis SEARCH Command
Locate search
Find/-name "***.***"
Which viewing tool
Whoami displays the current user
Gcc-v view GCC version
Delete chattr-I filename cancel prohibition
Lsattr show hidden attributes
Updatedb updates the database
Mke2fs format mkfs-t ext3
Dd if =/etc/passwd of =/tmp/passwd. bak backup
Mount: list all partitions in the system.
Mount-t iso9660/dev/cdrom/mnt/cdrom mounting Disc
Mount-t vfat/dev/fd0/mnt/floppy mount a floppy disk
Mount-t vfat-o iocharset = utf8, umask = 000/dev/hda2/mnt/hda2 mount the fat32 Partition
Mount-t ntfs-o nls = utf8, umask = 000/dev/hda3/mnt/hda3 mount ntfs partitions
Linux-NTFS Project: linux-ntfs.sourceforge.net/"> http://linux-ntfs.sourceforge.net/
Umount/mnt/hda3 volume
Ifconfig displays or sets network devices
Service network restart Nic
Ifdown eth0 disable Nic
Ifup eth0 enable Nic
Clear Screen
History! 55. Execute 55th commands
Stty terminal stty-
Fdisk/mbr Delete GRUB
At
Crontab: routinely executed command [e] edit, [l] display, [r] Delete task
& Background running program tar-zxvf 123.tar.gz & background running
View jobs in the background
Fg transfers the background program to the foreground. fg n is a number. You can specify the program.
Bg enables the work to run in the background
Kill End Process kill-9 PID [9] force end, [15] Normal end, [l] list available kill Signals
Ps aux viewing background programs
Top view background programs top-d 2 update every two seconds top-d 2-p10604 watch a PID
Top-B-n 2>/tmp/top.txt perform the top information twice, and then output the result to/tmp/top.txt.
Pstree uses the tree chart to display the program [A] connected with ASCII, [u] listing PID, [p] listing account
Killall to delete a service killall-9 httpd
Free Display memory status free-m displayed in MB
Uptime displays the current system boot time
Netstat displays the network status. netstat-tulnp: Find the network connection that is currently being monitored on the System and Its PID.
Dmesg displays the boot information demsg | more
Nice sets priority nice-n-5 vi & uses root to give a nice value of-5 for executing vi
Renice adjusted priority
Runlevel displays the current runlevel
Depmod
Lsmod displays the modules loaded into the system
Modinfo displays information about the kernel module
Insmod loading Module
Modprobe automatically processes the load-able Module
Rmmod Delete Module
Check the chkconfig and set the system's various services. The chkconfig -- list Option lists the service statuses.
Ntsysv sets various services of the system
Cpio backup file
Compression command:
* Files compressed by the. Z compress program;
*. Files compressed by the bz2bzip2 program;
*. Files compressed by the gz gzip program;
*. The data packaged by the tartar program has not been compressed;
* .Tar.gz tar package files, which are compressed by gzip
Compress filename compressed file plus [-d] uncompress
Gzip filename compression plus [-d] decompress zcat 123.gz to view the compressed file content
Bzip2-z filename compression plus [-d] unzip bzcat filename.bz2 to view the compressed file content
Tar-cvf/home/123.tar/etc package without compression
Tar-xvf 123.tar unpacks
Tar-zxvf/home/123.tar.gz unzip with gzip
Extract tar-jxvf/home/123.tar.bz2 with bzip2
Tar-ztvf/tmp/etc.tar.gz view tar content
Cpio-covB> [file | device] parts
Cpio-icduv <[file | device] restore
- Newbie School: software installation package in Linux
- Basic Linux commands
- New Tricks: Create a lock file in the Linux operating system