Fedora - Blogger - Code Programming - Database - Design

Command: The common commands on Linux


The common commands on Linux (CentOS, Redhat)
1. The test command performance
cat / proc / cpuinfo : displays CPU information
cat / proc / meminfo : displays information about RAM being used
cat / proc / version : display version of the kernel
cat / proc / ioports : listing information I / O port
cat / proc / interrupts : interrupt information
cat / proc / dma : view information about DMA
cat / etc / redhat-release : show version Centos
uname-a : displays information about kernel
free-m : show the amount of available RAM
df-h : displays system information files where each file resides or default all files and commands can see the disk space used and how much free space.
du-sh : see the size of the current directory
du-ah see details of the capacity subfolders, and files
du-h-max-depth = 1 : see subfolders capacity at level 1 (even in the current directory)
df : check disk space, disk partitions
top showing the operation of the process, especially information about system resources and use those resources for each process.
2. The command system
exit : exit command line window.
logout : similar exit .
reboot / init 6 / shutdow-r : restart the system.
halt / shutdow-h now / init 0 / : poweroff shutdown
hostname : view computer name
startx: XWindows mode launch  from a terminal window.
clear :  erase white command line window.
hwclock : Fix bios calendar
cal : calendar system.
yum update -y: Update Linux (CentOS)
date : see the date, time system.
date-s : "27 SEP 2011 14:26:00" Set the system date and time string
date +% Y% m% d-s "20,130,318" : set the system date (no time changes)
date +% T-s "00:29:00" : Timed system, not the date change
3. Commands to manipulate text files
wc : counts the number of lines, number of characters in the file ...
touch : to create a file.
cat : see file contents.
more : see content 's files in the page.
less : see file contents stream.
tail : view the file (by default the last 10 lines).
head : view file contents (see the first 10 rows default).
vi : launch of the text editor.
man : See instructions execute commands
4. Order management and process applications
rpm : check, remove or install one package. rpm
ps : check system processes running.
kill : process stops when the process crashes.
pstree : displays all the processes in the form of trees.
sleep : system shut down for a period of time.
yum : Install packaged applications (like rpm)
wget : Download the app from a website about
sh : Running an application tail .sh
5. User management commands
useradd : creates a new user.
userdel :  remove user created.
usermod : to change user information.
passwd : set and change passwords for users.
groupadd : to create a new user group.
groupdel : delete user created groups.
gpasswd : change the password of a user group.
su : allows login as another user.
groups : display the current user groups.
who / w : to know who is logged in the system.
skill -9 -t pst/0 to remove session pst / 0
user list: # vi / etc / passwd
group list: # vi / etc / group
chmod <permission> [file name] : change permissions for file / folder (user owns only new files are done)
chown user [file name] : change owner file / folder
chown user:group [file name] : change owner file / folder, and change the ownership group
chgrp group [file / dir] : changed ownership group file / folder
6. Order management service
service-status-all : Check all the service and its status.
service httpd start : Start service http.
whereis mysql : file showing where the service is installed.
service-status-all | grep abc : see the status of the process abc
<name_'s_service> service start | stop | restart
/ Etc / init.d / <name_'s_service> start | stop | restart
For example:
o service mysql stop
o / etc / init.d / mysqld start
7. The command file and folder management
ls : list files and subdirectories in the current directory
ls-l : as above, but lists the file size, date updates ...
ls-a : to list all hidden files
rm : delete file
rmdir : delete empty folders
rm-rf : not delete empty folders.
mv : rename / move :  the folder or file from one place to another
cp : copy files or folders
mkdir : to create a directory
cd : transfer directory
pwd : see the current directory
find : find file search
find / etc-name inittab: locate the file named inittab in / etc
8. Compression and decompression command
CVF compressed tar-file / folder to the format. tar
tar-xvf : unzip files. tar
gzip : file transfer. tar to. tar.gz
gunzip : file transfer. tar.gz about. tar
tar-xzf : unzip files. tar.gz
tar-zxvf : unzip files. tar.bz2
tar-jxvf : extracting file. tar.gz2