Home > English > Knowledge Base > Basic commands of centos / linux

Basic commands of centos / linux

 

# passwd : change the password (the first thing you should do right after we give you your VPS)

# yum update -y :update the system (make sure your VPS get latest updates)

# yum search <name of the searched package> : search a package name

# yum info <package name> : see the package info

# yum install <name of the installed package> -y : install the package

# yum remove <name of the uninstalled package> -y : uninstall

# yum install epel-release -y :install an eple package from yum (the easiest way to install an eple repository is from yum)

# wget <link> : download folders

# mkdir <new folder name> : creat a folder 

# rmdir  <deleted folder name> : delete a folder

# ls : see folder content (add -a to see the whole content including hidden files, add -l to show all information)

# cd <folder name> : move to other folders(eg: you in root want to move to the folder /etc/sysconfig/network-scripts/ , you type

   cd /etc/sysconfig/network-scripts/)

# cd .. : back to father folders

# cd - : back to the previous folders

# pwd : see the location (eg: you are in the folder /network-scripts/ , you type pwd then it'll show /etc/sysconfig/network-scripts)

# cp <source folder name> <goal folder name> : copy folders (not for folders containing chilld folders)

# cp -r <source folder name> <goal folder name> :copy all folders (for folders containing child folders)

# mv <source folder name> <goal folder name> : move folders (not for folders containing child folders)

# mv -r <source folder name> <goal folder name> : move all folders (for folders containing childe folders)

*note : source folders will be child folders of the goal folders

# touch <new file name> : creat new files

# find <folder to find> -name <searched file> : find file

# cat < file name> : see file content

# nano <file name> :edit files

# cp <source file name> <goal file name> :copy file (eg :you have file vd.txt which you want to copy to /etc/sysconfig/ then you type

  cp vd.txt /etc/sysconfig

# tar -xvf <unzipped file name> : unzip tails .tar

# top :show activities of the progress, especially info on system resources and the use of resources by each stage of the progress

 

# ps : test the running progress system 

# pstree : show all progress in form of a tree

# kill : stop the progress when the server is down

# sleep : inactivate the system for a while

# useradd <user name> : creat a new user

# passwd <user name> : set a password for the newly-created user

# userdel <user name> : delete a user

# groupadd <group name> : creat groups

# gpasswd <group name> :set a password for the newly-created group

# groupdel <> : delete groups

# who : inform who is logging in the system

# clear : clear the screen

# date : see the time

# history : see the log