0% found this document useful (0 votes)
2 views

Linux Command Guide-1

Uploaded by

yarzarayeko970
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Linux Command Guide-1

Uploaded by

yarzarayeko970
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Linux Command Guide

#uname –a Display Linux Kernel Version

#uname –r Display Linux Kernel Version

#cat /etc/redhat-release Display which version of redhat installed

#cat /etc/centos-release Display which version of centos installed

#uptime Show Linux machine Uptime or how long the


system has been running

#hostname Display Linux System Hostname

#hostname –I Display Hostname’s IP Address

#last reboot Display Last Reboot Time

#date Current Date and Time

#cal Show this month calendar

#w Display who are log in

#whoami Display who you are logged in as

#dmesg Display kernel boot message

#cat /proc/cpuinfo Display CPU Information

#cat /proc/meminfo Display Memory Information

#free –h Display Memory Information

#lspci –tv Display PCI Devices

#lsusb –tv Display USB Devices

#lsblk Display Block Devices

#df –h Display Mounted Devices

#dmidecode Display BIOS Information

#top Display Running System Process

#iostat 1 Display Hard Disk Read / Write Speed

#ps Display System Process Information


#kill [PID] Kill System Process

#pwd Print Working Directory

#expr 100 \* 100 Expression Command

#w List of Logging user terminal

#mkdir –help Make Directory Help Command

#mkdir loop Make Directory

#mkdir loop1 loop2 loop3 Make Directories

#mkdir loop{4,5,6} MakeDirectories

#touch –help Create File Help Command

#touch filea Create File

#touch fileb filec filed Create Files

#touch file{b,c,d} Create Files

#vim FileName Edit File

#vi FileName Edit File

#nano FileName Edit File

#cat FileName View File

#less FileName View File

#grep word FileName View specific word in File

#rm FileName Remove File

#rm –rf FileName Remove File without notification

#rm File1 File2 Remove Files

#gpg –c FileName Encrypt File

#gpg FileName.gpg Decrypt File

#cp SourcePath DestinationPath Copy File

#cp –ar SourcePath DestinationPath Copy File and Directory


#mv SourcePath DestinationPath Move File and Directory

#tar –cvf filename.tar filename Make TAR file

#tar –cvf directory.tar directory Create TAR Directory

#tar –xf FileName.tar Extra TAR File

#tar –xf Directory.tar Extra TAR Directory

#tar –czf FileName.tar.gz FileName Create TAR.GZ File

#tar –czf Directory.tar.gz Directory Create TAR.GZ Directory

#tar –zxvf Directory.tar.gz Extra TAR.GZ File or Directory

#zip –r zipdirname zipfilename Create Zip File

#unzip zipfilename.zip Extra Zip File

#gzip –v newfile.gz newfile Create GZ File

#gunzip NewFile.gz Extra GZ File

#gunzip </dev/cdrom> cdrom.iso.gz Create ISO File from Media

#mkisofs –V LabelName –r DirName | gzip > cdrom.iso.gz Create ISO File Directory

#mount –o loop cdrom.iso /mnt/dir

#dd if=/dev/cdrom of=/dir/myiso.iso Create ISO File

#adduser hello Create user name with hello

#passwd hello Create password for user hello

#userdel hello Delete Hello User

#userdel –r hello Delete Hello User with Home Dir

#ls –l Display File and Dir Permission

#chmod 760 FileName Chane File and Dir Permission

Optional Command ( Continue ; / Pipe | / Output > / Append >>)

#man alias Display Alias help

#alias mylist=ls ls command change to mylist

You might also like