Common terminal commands

Source: Internet
Author: User
Tags bz2 create directory rpmbuild
Common terminal Commands

By: Lingyired in 2011-10-04 17:05:30 (original article, reprinted)

One, the file directory Class 1. Build directory: mkdir directory name 2. Delete Empty directory: RmDir directory name 3. Delete the subdirectory unconditionally: RM-RF directory name 4. Change the current directory: CD directory name (go to User's home directory: cd ~; go to the previous level directory: CD-) 5. View your own Record: PWD 6. View current directory Size: du 7. Display list of catalog files: Ls-l (-A: Increase display of hidden directories): Blue: directory; green: executable; red: compressed file; light blue: Link file; Gray: Other files; white: Bad link file 8. Browse Files: more File name. txt;less file name. txt 9. Copy file: CP source File Destination file (-r: Contains directory) 10. Find Files: (1) found (2) Locate command name 11. Link: (1) Establish hard link: ln source file Link file (-d: Create directory link) ; (2) Establish symbolic Link: ln-s source file Link file

Second, drive Mount Class 1. Check hard drive Usage: df-t-H 2. Check disk partitions: Fdisk-l 3. Mount Soft Hard light area: mount-t/dev/fdx|hdax/mnt/directory name, including: modos–fat16;vfat–fat32;ntfs– NTFS, optical drive –iso9660, support Chinese name: Mount-o iocharset=x/dev/hdax/mnt/directory name, Mount Optical drive: mount-t auto/dev/cdrom/mnt/cdrom, Mount ISO file: mount-t Iso9660-o Loop Xxx.iso/path 4. Remove mount: umount/mnt/directory name, lifting all mounts: umount-a 5. File system: Mkfs-t/dev/hdxx. Among them: Ftype:ext2, ext3, swap, etc.

Third, the program installs the class

1.RPM Package Installation: (1) Install RPM-IVH somesoft.rpm (2) rpm-e somefost.rpm (3) query rpm-q somefost or Rpm-qpi somefost.rpm (where: P not installed; I contains ) (4) query after installation location: Rpm-ql somefost.rpm (5) Upgrade installation: Rpm-uvh somesoft.rpm (6) Forced installation: Rpm-ivh–nodeps somesoft.rpm or RPM-IVH–NODEP S–force somesoft.rpm

2. Source Code Package Installation:

Check the Readme

Basic usage: (1) Configuration: Extract directory under./configure (2) Compile: Extract directory make (3) Installation: Extract the directory make install

Installation of 3.src.rpm

You need to use the Rpmbuild command plus the –rebuild parameter. such as Rpmbuild–rebuild ***.src.rpm. and find it under the/usr/src/.

FC3 ISO program installation: System-config-packages–isodir=iso directory

RH under ISO program installation: Redhat-config-packages–isodir=iso directory

IV, compression decompression class 1.tar.gz: (1) Decompression: Tar-xvzf file. tar.gz (2) tar.gz to tar:gzip-d file. tar.gz (2) Compression: gzip Compressed file 2.tar uncompressed class: (1) Unpacking: TAR-XVF Files. Tar; (2) Packing: TAR-CVF files. tar file list 3.zip class: (1) Extract: Unzip file. zip-d dir; (2) Compression: Zip ZipFile to be compressed file list 4.bz2 class: (1) Extract: Bunzip2 file. bz2 or bzip2-d file. bz2 (2) Compression: Bzip2 to be compressed file 5.z class: (1) Decompression: uncompress file. Z; (2) Compression: Compress file

Five, Process Control class

1. List the current process Id:ps-auxw

2. Terminate process: (1) Terminate a single process: Kill Process ID Number (2) terminate the program All processes: Killall program name (3) Terminate X-window program: Xkill

3. View Resource Usage: (1) Top (2) Free (3) DMESG

4. View environment variable Value: ENV

5. Restart: (1) Reboot (2) Ctrl Alt Del (3) Init 6

6. Shutdown: (1) Shutdown-h now (2) halt (3) Init 0

7. Switch Desktop: Switchdesk gnome| Kde| ...

Six, the program runs the class

1. Query command: Whereis command name

2. Background Run X-window Program: Program Name &

3. Forcibly quit the X-window program: Ctrl Alt Backspace

4. View Help: (1) Concise help: command name –help | Less (2) More assistance: Man command name (3) Info command name (4) Help command name

5. View system path: Echo $PATH

6. View the current shell stack: Echo $SHLVL

7.</: input/output redirect; |: Pipe left input is pipe right input

Seven, the user account Class 1. Increase user account number: (1) User name: AddUser user account name (2) Set Password: passwd user account name 2. Delete user account: Userdel user account name 3. Add user group: Groupadd user group: 4 L User Group name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.