<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>command linux &#8211; Tin tức công nghệ thông tin, quảng cáo trực tuyến, mạng xã hội và công nghệ</title>
	<atom:link href="https://tuvancongnghe.net/tag/command-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://tuvancongnghe.net</link>
	<description>Tin tức công nghệ thông tin, quảng cáo trực tuyến, mạng xã hội và công nghệ</description>
	<lastBuildDate>Tue, 20 Dec 2022 06:50:21 +0000</lastBuildDate>
	<language>vi</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.5</generator>
	<item>
		<title>Toàn bộ câu lệnh trong Linux</title>
		<link>https://tuvancongnghe.net/toan-bo-cau-lenh-trong-linux/</link>
		
		<dc:creator><![CDATA[Bảo Châu]]></dc:creator>
		<pubDate>Wed, 24 Aug 2011 08:35:12 +0000</pubDate>
				<category><![CDATA[Kiến thức tin học]]></category>
		<category><![CDATA[câu lệnh trong linux]]></category>
		<category><![CDATA[command linux]]></category>
		<guid isPermaLink="false">http://tuvancongnghe.net/?p=1903</guid>

					<description><![CDATA[Toàn bộ câu lệnh sử dụng trong Server Linux từ A &#8211; Z Linux Commands Line A &#8211; Z A     Command Description # alias hh=&#8217;history&#8217; set an alias for a command &#8211; hh = history # apropos &#8230;keyword display a list of commands that pertain to keywords of a program , useful when you know [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2 style="text-align: center;">Toàn bộ câu lệnh sử dụng trong Server Linux từ A &#8211; Z</h2>
<p>Linux Commands Line A &#8211; Z</p>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%"><strong>A     Command</strong></td>
<td width="52%"><strong>Description </strong></td>
</tr>
<tr>
<td valign="top" width="48%"># alias hh=&#8217;history&#8217;</td>
<td valign="top" width="52%">set an alias for a command &#8211; hh = history</td>
</tr>
<tr>
<td valign="top" width="48%"># apropos &#8230;keyword</td>
<td valign="top" width="52%">display a list of commands that pertain to keywords of a program , useful when you know what your program does, but you don&#8217;t know the name of the command</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-cache search [package]</td>
<td valign="top" width="52%">returns list of packages which corresponds string &#8220;searched-packages&#8221;</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-cdrom install [package]</td>
<td valign="top" width="52%">install / upgrade a deb package from cdrom</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-get install [package]</td>
<td valign="top" width="52%">install / upgrade a deb package</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-get update</td>
<td valign="top" width="52%">update the package list</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-get upgrade</td>
<td valign="top" width="52%">upgrade all of the installed packages</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-get remove [package]</td>
<td valign="top" width="52%">remove a deb package from system</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-get check</td>
<td valign="top" width="52%">verify correct resolution of dependencies</td>
</tr>
<tr>
<td valign="top" width="48%"># apt-get clean</td>
<td valign="top" width="52%">clean up cache from packages downloaded</td>
</tr>
<tr>
<td valign="top" width="48%"># arch</td>
<td valign="top" width="52%">show architecture of machine(1)</td>
</tr>
<tr>
<td valign="top" width="48%"># cat example.txt | awk &#8216;NR%2==1&#8217;</td>
<td valign="top" width="52%">remove all even lines from example.txt</td>
</tr>
<tr>
<td valign="top" width="48%"># echo a b c | awk &#8216;{print $1}&#8217;</td>
<td valign="top" width="52%">view the first column of a line</td>
</tr>
<tr>
<td valign="top" width="48%"># echo a b c | awk &#8216;{print $1,$3}&#8217;</td>
<td valign="top" width="52%">view the first and third column of a line</td>
</tr>
</tbody>
</table>
<table border="1" width="575" cellpadding="0" align="left">
<tbody>
<tr>
<td width="58%">B    Command</td>
<td width="40%">Description</td>
</tr>
<tr>
<td valign="top" width="58%"># badblocks -v /dev/hda1</td>
<td valign="top" width="40%">check bad blocks on disk hda1</td>
</tr>
<tr>
<td valign="top" width="58%"># bunzip2 file1.bz2</td>
<td valign="top" width="40%">decompress a file called &#8216;file1.bz2&#8217;</td>
</tr>
<tr>
<td valign="top" width="58%"># bzip2 file1</td>
<td valign="top" width="40%">compress a file called &#8216;file1&#8217;</td>
</tr>
<tr>
<td valign="top" width="58%"># find /var/log -name &#8216;*.log&#8217; | tar cv &#8211;files-from=- | bzip2 &gt; log.tar.bz2</td>
<td valign="top" width="40%">find all files with &#8216;.log&#8217; extention and make an bzip archive</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">C      Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># cal 2007</td>
<td valign="top" width="52%">show the timetable of 2007</td>
</tr>
<tr>
<td valign="top" width="48%"># cat /proc/cpuinfo</td>
<td valign="top" width="52%">show information CPU info</td>
</tr>
<tr>
<td valign="top" width="48%"># cat /proc/interrupts</td>
<td valign="top" width="52%">show interrupts</td>
</tr>
<tr>
<td valign="top" width="48%"># cat /proc/meminfo</td>
<td valign="top" width="52%">verify memory use</td>
</tr>
<tr>
<td valign="top" width="48%"># cat /proc/swaps</td>
<td valign="top" width="52%">show file(s) swap</td>
</tr>
<tr>
<td valign="top" width="48%"># cat /proc/version</td>
<td valign="top" width="52%">show version of the kernel</td>
</tr>
<tr>
<td valign="top" width="48%"># cat /proc/net/dev</td>
<td valign="top" width="52%">show network adpters and statistics</td>
</tr>
<tr>
<td valign="top" width="48%"># cat /proc/mounts</td>
<td valign="top" width="52%">show mounted file system(s)</td>
</tr>
<tr>
<td valign="top" width="48%"># cat file1</td>
<td valign="top" width="52%">view the contents of a file starting from the first row</td>
</tr>
<tr>
<td valign="top" width="48%"># cat -n file1</td>
<td valign="top" width="52%">number row of a file</td>
</tr>
<tr>
<td valign="top" width="48%"># cd /home</td>
<td valign="top" width="52%">enter to directory &#8216;/ home&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># cd ..</td>
<td valign="top" width="52%">go back one level</td>
</tr>
<tr>
<td valign="top" width="48%"># cd ../..</td>
<td valign="top" width="52%">go back two levels</td>
</tr>
<tr>
<td valign="top" width="48%"># cd</td>
<td valign="top" width="52%">go to home directory</td>
</tr>
<tr>
<td valign="top" width="48%"># cd ~user1</td>
<td valign="top" width="52%">go to home directory</td>
</tr>
<tr>
<td valign="top" width="48%"># cd &#8211;</td>
<td valign="top" width="52%">go to previous directory</td>
</tr>
<tr>
<td valign="top" width="48%"># cd-paranoia -B</td>
<td valign="top" width="52%">rip audio tracks from a CD to wav files</td>
</tr>
<tr>
<td valign="top" width="48%"># cd-paranoia &#8212;</td>
<td valign="top" width="52%">rip first three audio tracks from a CD to wav files</td>
</tr>
<tr>
<td valign="top" width="48%"># cdrecord -v gracetime=2 dev=/dev/cdrom -eject blank=fast -force</td>
<td valign="top" width="52%">clean a rewritable cdrom</td>
</tr>
<tr>
<td valign="top" width="48%"># cdrecord -v dev=/dev/cdrom cd.iso</td>
<td valign="top" width="52%">burn an ISO image</td>
</tr>
<tr>
<td valign="top" width="48%"># gzip -dc cd_iso.gz | cdrecord dev=/dev/cdrom &#8211;</td>
<td valign="top" width="52%">burn a compressed ISO image</td>
</tr>
<tr>
<td valign="top" width="48%"># cdrecord &#8211;scanbus</td>
<td valign="top" width="52%">scan bus to identify the channel scsi</td>
</tr>
<tr>
<td valign="top" width="48%"># chage -E 2005-12-31 user1</td>
<td valign="top" width="52%">set deadline for user password</td>
</tr>
<tr>
<td valign="top" width="48%"># chattr +a file1</td>
<td valign="top" width="52%">allows write opening of a file only append mode</td>
</tr>
<tr>
<td valign="top" width="48%"># chattr +c file1</td>
<td valign="top" width="52%">allows that a file is compressed / decompressed automatically by the kernel</td>
</tr>
<tr>
<td valign="top" width="48%"># chattr +d file1</td>
<td valign="top" width="52%">makes sure that the program ignores Dump the files during backup</td>
</tr>
<tr>
<td valign="top" width="48%"># chattr +i file1</td>
<td valign="top" width="52%">makes it an immutable file, which can not be removed, altered, renamed or linked</td>
</tr>
<tr>
<td valign="top" width="48%"># chattr +s file1</td>
<td valign="top" width="52%">allows a file to be deleted safely</td>
</tr>
<tr>
<td valign="top" width="48%"># chattr +S file1</td>
<td valign="top" width="52%">makes sure that if a file is modified changes are written in synchronous mode as with sync</td>
</tr>
<tr>
<td valign="top" width="48%"># chattr +u file1</td>
<td valign="top" width="52%">allows you to recover the contents of a file even if it is canceled</td>
</tr>
<tr>
<td valign="top" width="48%"># chgrp group1 file1</td>
<td valign="top" width="52%">change group of files</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod ugo+rwx directory1</td>
<td valign="top" width="52%">set permissions reading (r), write (w) and (x) access to users owner (u) group (g) and others (o)</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod go-rwx directory1</td>
<td valign="top" width="52%">remove permits reading (r), write (w) and (x) access to users group (g) and others (or</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod u+s /bin/file1</td>
<td valign="top" width="52%">set SUID bit on a binary file &#8211; the user that running that file gets same privileges as owner</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod u-s /bin/file1</td>
<td valign="top" width="52%">disable SUID bit on a binary file</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod g+s /home/public</td>
<td valign="top" width="52%">set SGID bit on a directory &#8211; similar to SUID but for directory</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod g-s /home/public</td>
<td valign="top" width="52%">disable SGID bit on a directory</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod o+t /home/public</td>
<td valign="top" width="52%">set STIKY bit on a directory &#8211; allows files deletion only to legitimate owners</td>
</tr>
<tr>
<td valign="top" width="48%"># chmod o-t /home/public</td>
<td valign="top" width="52%">disable STIKY bit on a directory</td>
</tr>
<tr>
<td valign="top" width="48%"># chown user1 file1</td>
<td valign="top" width="52%">change owner of a file</td>
</tr>
<tr>
<td valign="top" width="48%"># chown -R user1 directory1</td>
<td valign="top" width="52%">change user owner of a directory and all the files and directories contained inside</td>
</tr>
<tr>
<td valign="top" width="48%"># chown user1:group1 file1</td>
<td valign="top" width="52%">change user and group ownership of a file</td>
</tr>
<tr>
<td valign="top" width="48%"># chsh</td>
<td valign="top" width="52%">change shell command</td>
</tr>
<tr>
<td valign="top" width="48%"># chsh &#8211;list-shells</td>
<td valign="top" width="52%">nice command to know if you have to remote into another box</td>
</tr>
<tr>
<td valign="top" width="48%"># clock -w</td>
<td valign="top" width="52%">save date changes on BIOS</td>
</tr>
<tr>
<td valign="top" width="48%"># comm -1 file1 file2</td>
<td valign="top" width="52%">compare contents of two files by deleting only unique lines from &#8216;file1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># comm -2 file1 file2</td>
<td valign="top" width="52%">compare contents of two files by deleting only unique lines from &#8216;file2&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># comm -3 file1 file2</td>
<td valign="top" width="52%">compare contents of two files by deleting only the lines that appear on both files</td>
</tr>
<tr>
<td valign="top" width="48%"># cp file1 file2</td>
<td valign="top" width="52%">copying a file</td>
</tr>
<tr>
<td valign="top" width="48%"># cp dir/* .</td>
<td valign="top" width="52%">copy all files of a directory within the current work directory</td>
</tr>
<tr>
<td valign="top" width="48%"># cp -a /tmp/dir1 .</td>
<td valign="top" width="52%">copy a directory within the current work directory</td>
</tr>
<tr>
<td valign="top" width="48%"># cp -a dir1 dir2</td>
<td valign="top" width="52%">copy a directory</td>
</tr>
<tr>
<td valign="top" width="48%"># find /home/user1 -name &#8216;*.txt&#8217; | xargs cp -av &#8211;target-directory=/home/backup/ &#8211;parents</td>
<td valign="top" width="52%">find and copy all files with &#8216;.txt&#8217; extention from a directory to another</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">D      Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># date</td>
<td valign="top" width="52%">show system date</td>
</tr>
<tr>
<td valign="top" width="48%"># date 041217002007.00</td>
<td valign="top" width="52%">set date and time &#8211; MonthDayhoursMinutesYear.Seconds</td>
</tr>
<tr>
<td valign="top" width="48%"># dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr &#8216;dd of=hda.gz&#8217;</td>
<td valign="top" width="52%">make a backup of a local hard disk on remote host via ssh</td>
</tr>
<tr>
<td valign="top" width="48%"># dd if=/dev/sda of=/tmp/file1</td>
<td valign="top" width="52%">backup content of the harddrive to a file</td>
</tr>
<tr>
<td valign="top" width="48%"># dd if=/dev/hda of=/dev/fd0 bs=512 count=1</td>
<td valign="top" width="52%">make a copy of MBR (Master Boot Record) to floppy</td>
</tr>
<tr>
<td valign="top" width="48%"># dd if=/dev/fd0 of=/dev/hda bs=512 count=1</td>
<td valign="top" width="52%">restore MBR from backup copy saved to floppy</td>
</tr>
<tr>
<td valign="top" width="48%"># df -h</td>
<td valign="top" width="52%">show list of partitions mounted</td>
</tr>
<tr>
<td valign="top" width="48%"># dhclient eth0</td>
<td valign="top" width="52%">active interface &#8216;eth0&#8217; in dhcp mode</td>
</tr>
<tr>
<td valign="top" width="48%"># diff file1 file2</td>
<td valign="top" width="52%">find differences between two files</td>
</tr>
<tr>
<td valign="top" width="48%"># dmidecode -q</td>
<td valign="top" width="52%">show hardware system components &#8211; (SMBIOS / DMI)</td>
</tr>
<tr>
<td valign="top" width="48%"># dos2unix filedos.txt fileunix.txt</td>
<td valign="top" width="52%">convert a text file format from MSDOS to UNIX</td>
</tr>
<tr>
<td valign="top" width="48%"># dosfsck /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of dos filesystems on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg-query -W -f=&#8217;${Installed-Size;10}t${Package}n&#8217; | sort -k1,1n</td>
<td valign="top" width="52%">show the used space by installed deb packages, sorting by size (debian, ubuntu and alike)</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg -i [package.deb]</td>
<td valign="top" width="52%">install / upgrade a deb package</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg -r [package]</td>
<td valign="top" width="52%">remove a deb package from the system</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg -l</td>
<td valign="top" width="52%">show all deb packages installed on the system</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg -l | grep httpd</td>
<td valign="top" width="52%">show all deb packages with the name &#8220;httpd&#8221;</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg -s [package]</td>
<td valign="top" width="52%">obtain information on a specific package installed on system</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg -L [package]</td>
<td valign="top" width="52%">show list of files provided by a package installed on system</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg &#8211;contents [package.deb]</td>
<td valign="top" width="52%">show list of files provided by a package not yet installed</td>
</tr>
<tr>
<td valign="top" width="48%"># dpkg -S /bin/ping</td>
<td valign="top" width="52%">verify which package belongs to a given file</td>
</tr>
<tr>
<td valign="top" width="48%"># du -sh dir1</td>
<td valign="top" width="52%">estimate space used by directory &#8216;dir1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># du -sk * | sort -rn</td>
<td valign="top" width="52%">show size of the files and directories sorted by size</td>
</tr>
<tr>
<td valign="top" width="48%"># dump -0aj -f /tmp/home0.bak /home</td>
<td valign="top" width="52%">make a full backup of directory &#8216;/home&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># dump -1aj -f /tmp/home0.bak /home</td>
<td valign="top" width="52%">make a incremental backup of directory &#8216;/home&#8217;</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">E     Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># e2fsck /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of ext2 filesystem on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># e2fsck -j /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of ext3 filesystem on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># ethtool eth0</td>
<td valign="top" width="52%">show network statistics of eth0</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">F   Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># fdformat -n /dev/fd0</td>
<td valign="top" width="52%">format a floppy disk</td>
</tr>
<tr>
<td valign="top" width="48%"># cp file file1</td>
<td valign="top" width="52%">outputs the mime type of the file as text</td>
</tr>
<tr>
<td valign="top" width="48%"># find / -name file1</td>
<td valign="top" width="52%">search file and directory into root filesystem from &#8216;/&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># find / -user user1</td>
<td valign="top" width="52%">search files and directories belonging to &#8216;user1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># find /home/user1 -name \*.bin</td>
<td valign="top" width="52%">search files with &#8216;. bin&#8217; extension within directory &#8216;/ home/user1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># find /usr/bin -type f -atime +100</td>
<td valign="top" width="52%">search binary files are not used in the last 100 days</td>
</tr>
<tr>
<td valign="top" width="48%"># find /usr/bin -type f -mtime -10</td>
<td valign="top" width="52%">search files created or changed within 10 days</td>
</tr>
<tr>
<td valign="top" width="48%"># find / -name *.rpm -exec chmod 755 &#8216;{}&#8217; \;</td>
<td valign="top" width="52%">search files with &#8216;.rpm&#8217; extension and modify permits</td>
</tr>
<tr>
<td valign="top" width="48%"># find / -xdev -name \*.rpm</td>
<td valign="top" width="52%">search files with &#8216;.rpm&#8217; extension ignoring removable partitions as cdrom, pen-drive, etc.…</td>
</tr>
<tr>
<td valign="top" width="48%"># find / -perm -u+s</td>
<td valign="top" width="52%">view all files on the system with SUID configured</td>
</tr>
<tr>
<td valign="top" width="48%"># free -m</td>
<td valign="top" width="52%">displays status of RAM in megabytes</td>
</tr>
<tr>
<td valign="top" width="48%"># fsck /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of linux filesystem on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># fsck.ext2 /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of ext2 filesystem on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># fsck.ext3 /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of ext3 filesystem on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># fsck.vfat /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of fat filesystem on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># fsck.msdos /dev/hda1</td>
<td valign="top" width="52%">repair / check integrity of dos filesystem on disk hda1</td>
</tr>
<tr>
<td valign="top" width="48%"># fuser -km /mnt/hda2</td>
<td valign="top" width="52%">force umount when the device is busy</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">G     Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># gpg -c file1</td>
<td valign="top" width="52%">encrypt a file with GNU Privacy Guard</td>
</tr>
<tr>
<td valign="top" width="48%"># gpg file1.gpg</td>
<td valign="top" width="52%">decrypt a file with GNU Privacy Guard</td>
</tr>
<tr>
<td valign="top" width="48%"># grep Aug /var/log/messages</td>
<td valign="top" width="52%">look up words &#8220;Aug&#8221; on file &#8216;/var/log/messages&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># grep ^Aug /var/log/messages</td>
<td valign="top" width="52%">look up words that begin with &#8220;Aug&#8221; on file &#8216;/var/log/messages&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># grep [0-9] /var/log/messages</td>
<td valign="top" width="52%">select from file &#8216;/var/log/messages&#8217; all lines that contain numbers</td>
</tr>
<tr>
<td valign="top" width="48%"># grep Aug -R /var/log/*</td>
<td valign="top" width="52%">search string &#8220;Aug&#8221; at directory &#8216;/var/log&#8217; and below</td>
</tr>
<tr>
<td valign="top" width="48%"># groupadd [group]</td>
<td valign="top" width="52%">create a new group</td>
</tr>
<tr>
<td valign="top" width="48%"># groupdel [group]</td>
<td valign="top" width="52%">delete a group</td>
</tr>
<tr>
<td valign="top" width="48%"># groupmod -n moon sun</td>
<td valign="top" width="52%">rename a group from moon to sun</td>
</tr>
<tr>
<td valign="top" width="48%"># grpck</td>
<td valign="top" width="52%">check correct syntax and file format of &#8216;/etc/group&#8217; and groups existence</td>
</tr>
<tr>
<td valign="top" width="48%"># gunzip file1.gz</td>
<td valign="top" width="52%">decompress a file called &#8216;file1.gz&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># gzip file1</td>
<td valign="top" width="52%">compress a file called &#8216;file1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># gzip -9 file1</td>
<td valign="top" width="52%">compress with maximum compression</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">H      Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># hdparm -i /dev/hda</td>
<td valign="top" width="52%">displays the characteristics of a hard-disk</td>
</tr>
<tr>
<td valign="top" width="48%"># hdparm -tT /dev/sda</td>
<td valign="top" width="52%">perform test reading on a hard-disk</td>
</tr>
<tr>
<td valign="top" width="48%"># head -2 file1</td>
<td valign="top" width="52%">view first two lines of a file</td>
</tr>
<tr>
<td valign="top" width="48%"># host www.example.com</td>
<td valign="top" width="52%">lookup hostname to resolve name to ip address and viceversa</td>
</tr>
<tr>
<td valign="top" width="48%"># hostname</td>
<td valign="top" width="52%">show hostname of system</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">I    Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># iconv -l</td>
<td valign="top" width="52%">lists known encodings</td>
</tr>
<tr>
<td valign="top" width="48%"># iconv -f fromEncoding -t toEncoding inputFile &gt; outputFile</td>
<td valign="top" width="52%">converting the coding of characters from one format to another</td>
</tr>
<tr>
<td valign="top" width="48%"># find . -maxdepth 1 -name *.jpg -print -exec convert</td>
<td valign="top" width="52%">batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick)</td>
</tr>
<tr>
<td valign="top" width="48%"># ifconfig eth0</td>
<td valign="top" width="52%">show configuration of an ethernet network card</td>
</tr>
<tr>
<td valign="top" width="48%"># ifconfig eth0 192.168.1.1 netmask 255.255.255.0</td>
<td valign="top" width="52%">configure IP Address</td>
</tr>
<tr>
<td valign="top" width="48%"># ifconfig eth0 promisc</td>
<td valign="top" width="52%">configure &#8216;eth0&#8217; in promiscuous mode to gather packets (sniffing)</td>
</tr>
<tr>
<td valign="top" width="48%"># ifdown eth0</td>
<td valign="top" width="52%">disable an interface &#8216;eth0&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># ifup eth0</td>
<td valign="top" width="52%">activate an interface &#8216;eth0&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># init 0</td>
<td valign="top" width="52%">shutdown system(2)</td>
</tr>
<tr>
<td valign="top" width="48%"># ip link show</td>
<td valign="top" width="52%">show link status of all network interfaces</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t filter -L</td>
<td valign="top" width="52%">show all chains of filtering table</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t nat -L</td>
<td valign="top" width="52%">show all chains of nat table</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t filter -F</td>
<td valign="top" width="52%">clear all rules from filtering table</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t nat -F</td>
<td valign="top" width="52%">clear all rules from table nat</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t filter -X</td>
<td valign="top" width="52%">delete any chains created by user</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t filter -A INPUT -p tcp &#8211;dport telnet -j ACCEPT</td>
<td valign="top" width="52%">allow telnet connections to input</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t filter -A OUTPUT -p tcp &#8211;dport http -j DROP</td>
<td valign="top" width="52%">block HTTP connections to output</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t filter -A FORWARD -p tcp &#8211;dport pop3 -j ACCEPT</td>
<td valign="top" width="52%">allow POP3 connections to forward chain</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t filter -A INPUT -j LOG &#8211;log-prefix</td>
<td valign="top" width="52%">Logging on input chain</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</td>
<td valign="top" width="52%">configure a PAT (Port Address Traslation) on eth0 masking outbound packets</td>
</tr>
<tr>
<td valign="top" width="48%"># iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp -m tcp &#8211;dport 22 -j DNAT &#8211;to-destination 10.0.0.2:22</td>
<td valign="top" width="52%">redirect packets addressed to a host to another host</td>
</tr>
<tr>
<td valign="top" width="48%"># iwconfig eth1</td>
<td valign="top" width="52%">show wireless networks</td>
</tr>
<tr>
<td valign="top" width="48%"># iwlist scan</td>
<td valign="top" width="52%">wifi scanning to display the wireless connections available</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">K    Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># kill -9 process_id</td>
<td valign="top" width="52%">force closure of the process and finish it</td>
</tr>
<tr>
<td valign="top" width="48%"># kill -1 process_id</td>
<td valign="top" width="52%">force a process to reload configuration</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">L       Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># last reboot</td>
<td valign="top" width="52%">show history reboot</td>
</tr>
<tr>
<td valign="top" width="48%"># ldd /usr/bin/ssh</td>
<td valign="top" width="52%">show shared libraries required by ssh program</td>
</tr>
<tr>
<td valign="top" width="48%"># less file1</td>
<td valign="top" width="52%">similar to &#8216;more&#8217; command but which allows backward movement in the file as well as forward movement</td>
</tr>
<tr>
<td valign="top" width="48%"># ln -s file1 lnk1</td>
<td valign="top" width="52%">create a symbolic link to file or directory</td>
</tr>
<tr>
<td valign="top" width="48%"># ln file1 lnk1</td>
<td valign="top" width="52%">create a physical link to file or directory</td>
</tr>
<tr>
<td valign="top" width="48%"># locate \*.ps</td>
<td valign="top" width="52%">find files with the &#8216;.ps&#8217; extension &#8211; first run &#8216;updatedb&#8217; command</td>
</tr>
<tr>
<td valign="top" width="48%"># logout</td>
<td valign="top" width="52%">leaving session</td>
</tr>
<tr>
<td valign="top" width="48%"># ls</td>
<td valign="top" width="52%">view files of directory</td>
</tr>
<tr>
<td valign="top" width="48%"># ls -F</td>
<td valign="top" width="52%">view files of directory</td>
</tr>
<tr>
<td valign="top" width="48%"># ls -l</td>
<td valign="top" width="52%">show details of files and directory</td>
</tr>
<tr>
<td valign="top" width="48%"># ls -a</td>
<td valign="top" width="52%">show hidden files</td>
</tr>
<tr>
<td valign="top" width="48%"># ls *[0-9]*</td>
<td valign="top" width="52%">show files and directory containing numbers</td>
</tr>
<tr>
<td valign="top" width="48%"># ls -lSr |more</td>
<td valign="top" width="52%">show size of the files and directories ordered by size</td>
</tr>
<tr>
<td valign="top" width="48%"># ls -lh</td>
<td valign="top" width="52%">show permits on files</td>
</tr>
<tr>
<td valign="top" width="48%"># ls /tmp | pr -T5 -W$COLUMNS</td>
<td valign="top" width="52%">divide terminal into 5 columns</td>
</tr>
<tr>
<td valign="top" width="48%"># lsattr</td>
<td valign="top" width="52%">show specials attributes</td>
</tr>
<tr>
<td valign="top" width="48%"># lsmod</td>
<td valign="top" width="52%">display kernel loaded</td>
</tr>
<tr>
<td valign="top" width="48%"># lsof -p process_id</td>
<td valign="top" width="52%">display a list of files opened by processes</td>
</tr>
<tr>
<td valign="top" width="48%"># lsof /home/user1</td>
<td valign="top" width="52%">displays a list of open files in a given path system</td>
</tr>
<tr>
<td valign="top" width="48%"># lspci -tv</td>
<td valign="top" width="52%">display PCI devices</td>
</tr>
<tr>
<td valign="top" width="48%"># lstree</td>
<td valign="top" width="52%">show files and directories in a tree starting from root(2)</td>
</tr>
<tr>
<td valign="top" width="48%"># lsusb -tv</td>
<td valign="top" width="52%">show USB devices</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">M     Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># man ping</td>
<td valign="top" width="52%">display the on-line manual pages for example on ping command &#8211; use &#8216;-k&#8217; option to find any related commands</td>
</tr>
<tr>
<td valign="top" width="48%"># dd if=/dev/hdc | md5sum</td>
<td valign="top" width="52%">perform an md5sum on a device, like a CD</td>
</tr>
<tr>
<td valign="top" width="48%"># mii-tool eth0</td>
<td valign="top" width="52%">show link status of &#8216;eth0&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># mkbootdisk &#8211;device /dev/fd0 `uname -r`</td>
<td valign="top" width="52%">create a boot floppy</td>
</tr>
<tr>
<td valign="top" width="48%"># mkdir dir1</td>
<td valign="top" width="52%">create a directory called &#8216;dir1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># mkdir dir1 dir2</td>
<td valign="top" width="52%">create two directories simultaneously</td>
</tr>
<tr>
<td valign="top" width="48%"># mkdir -p /tmp/dir1/dir2</td>
<td valign="top" width="52%">create a directory tree</td>
</tr>
<tr>
<td valign="top" width="48%"># mke2fs /dev/hda1</td>
<td valign="top" width="52%">create a filesystem type linux ext2 on hda1 partition</td>
</tr>
<tr>
<td valign="top" width="48%"># mke2fs -j /dev/hda1</td>
<td valign="top" width="52%">create a filesystem type linux ext3 (journal) on hda1 partition</td>
</tr>
<tr>
<td valign="top" width="48%"># mkfs /dev/hda1</td>
<td valign="top" width="52%">create a filesystem type linux on hda1 partition</td>
</tr>
<tr>
<td valign="top" width="48%"># mkfs -t vfat 32 -F /dev/hda1</td>
<td valign="top" width="52%">create a FAT32 filesystem</td>
</tr>
<tr>
<td valign="top" width="48%"># mkisofs /dev/cdrom &gt; cd.iso</td>
<td valign="top" width="52%">create an iso image of cdrom on disk</td>
</tr>
<tr>
<td valign="top" width="48%"># mkisofs /dev/cdrom | gzip &gt; cd_iso.gz</td>
<td valign="top" width="52%">create a compressed iso image of cdrom on disk</td>
</tr>
<tr>
<td valign="top" width="48%"># mkisofs -J -allow-leading-dots -R -V</td>
<td valign="top" width="52%">create an iso image of a directory</td>
</tr>
<tr>
<td valign="top" width="48%"># mkswap /dev/hda3</td>
<td valign="top" width="52%">create a swap filesystem</td>
</tr>
<tr>
<td valign="top" width="48%"># mkswap /dev/hda3</td>
<td valign="top" width="52%">create a swap filesystem</td>
</tr>
<tr>
<td valign="top" width="48%"># more file1</td>
<td valign="top" width="52%">view content of a file along</td>
</tr>
<tr>
<td valign="top" width="48%"># mount /dev/hda2 /mnt/hda2</td>
<td valign="top" width="52%">mount disk called hda2 &#8211; verify existence of the directory &#8216;/ mnt/hda2&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># mount /dev/fd0 /mnt/floppy</td>
<td valign="top" width="52%">mount a floppy disk</td>
</tr>
<tr>
<td valign="top" width="48%"># mount /dev/cdrom /mnt/cdrom</td>
<td valign="top" width="52%">mount a cdrom / dvdrom</td>
</tr>
<tr>
<td valign="top" width="48%"># mount /dev/hdc /mnt/cdrecorder</td>
<td valign="top" width="52%">mount a cdrw / dvdrom</td>
</tr>
<tr>
<td valign="top" width="48%"># mount /dev/hdb /mnt/cdrecorder</td>
<td valign="top" width="52%">mount a cdrw / dvdrom</td>
</tr>
<tr>
<td valign="top" width="48%"># mount -o loop file.iso /mnt/cdrom</td>
<td valign="top" width="52%">mount a file or iso image</td>
</tr>
<tr>
<td valign="top" width="48%"># mount -t vfat /dev/hda5 /mnt/hda5</td>
<td valign="top" width="52%">mount a Windows FAT32 file system</td>
</tr>
<tr>
<td valign="top" width="48%"># mount /dev/sda1 /mnt/usbdisk</td>
<td valign="top" width="52%">mount a usb pen-drive or flash-drive</td>
</tr>
<tr>
<td valign="top" width="48%"># mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share</td>
<td valign="top" width="52%">mount a windows network share</td>
</tr>
<tr>
<td valign="top" width="48%"># mount -o loop cd.iso /mnt/iso</td>
<td valign="top" width="52%">mount an ISO image</td>
</tr>
<tr>
<td valign="top" width="48%"># mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share</td>
<td valign="top" width="52%">mount a windows network share</td>
</tr>
<tr>
<td valign="top" width="48%"># mv dir1 new_dir</td>
<td valign="top" width="52%">rename / move a file or directory   [<a title="Get more informations about this command from the official Linux Man Page" href="http://www.linuxguide.it/command_line/linux-manpage/do.php?file=mv" target="_blank" rel="noopener">man</a>]</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">N    Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># nbtscan ip_addr</td>
<td valign="top" width="52%">netbios name resolution</td>
</tr>
<tr>
<td valign="top" width="48%"># netstat -tup</td>
<td valign="top" width="52%">show all active network connections and their PID</td>
</tr>
<tr>
<td valign="top" width="48%"># netstat -tupl</td>
<td valign="top" width="52%">show all network services listening on the system and their PID</td>
</tr>
<tr>
<td valign="top" width="48%"># netstat -rn</td>
<td valign="top" width="52%">show routing table alike &#8220;route -n&#8221;</td>
</tr>
<tr>
<td valign="top" width="48%"># newgrp &#8211; [group]</td>
<td valign="top" width="52%">log into a new group to change default group of newly created files</td>
</tr>
<tr>
<td valign="top" width="48%"># nmblookup -A ip_addr</td>
<td valign="top" width="52%">netbios name resolution</td>
</tr>
<tr>
<td valign="top" width="48%"># nslookup www.example.com</td>
<td valign="top" width="52%">lookup hostname to resolve name to ip address and viceversa</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">P   Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># pacman -S name</td>
<td valign="top" width="52%">Install package &#8216;name&#8217; with dependencies</td>
</tr>
<tr>
<td valign="top" width="48%"># pacman -R name</td>
<td valign="top" width="52%">Delete package &#8216;name&#8217; and all files of it</td>
</tr>
<tr>
<td valign="top" width="48%"># passwd</td>
<td valign="top" width="52%">change password</td>
</tr>
<tr>
<td valign="top" width="48%"># passwd user1</td>
<td valign="top" width="52%">change a user password (only by root)</td>
</tr>
<tr>
<td valign="top" width="48%"># paste file1 file2</td>
<td valign="top" width="52%">merging contents of two files for columns</td>
</tr>
<tr>
<td valign="top" width="48%"># paste -d &#8216;+&#8217; file1 file2</td>
<td valign="top" width="52%">merging contents of two files for columns with &#8216;+&#8217; delimiter on the center</td>
</tr>
<tr>
<td valign="top" width="48%"># ps -eafw</td>
<td valign="top" width="52%">displays linux tasks</td>
</tr>
<tr>
<td valign="top" width="48%"># ps -e -o pid,args &#8211;forest</td>
<td valign="top" width="52%">displays linux tasks in a hierarchical mode</td>
</tr>
<tr>
<td valign="top" width="48%"># pstree</td>
<td valign="top" width="52%">Shows a tree system processes</td>
</tr>
<tr>
<td valign="top" width="48%"># pwck</td>
<td valign="top" width="52%">check correct syntax and file format of &#8216;/etc/passwd&#8217; and users existence</td>
</tr>
<tr>
<td valign="top" width="48%"># pwd</td>
<td valign="top" width="52%">show the path of work directory</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">R      Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># rar a file1.rar test_file</td>
<td valign="top" width="52%">create an archive rar called &#8216;file1.rar&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># rar a file1.rar file1 file2 dir1</td>
<td valign="top" width="52%">compress &#8216;file1&#8217;, &#8216;file2&#8217; and &#8216;dir1&#8217; simultaneously</td>
</tr>
<tr>
<td valign="top" width="48%"># rar x file1.rar</td>
<td valign="top" width="52%">decompress rar archive</td>
</tr>
<tr>
<td valign="top" width="48%"># reboot</td>
<td valign="top" width="52%">reboot(2)</td>
</tr>
<tr>
<td valign="top" width="48%"># recode ..HTML &lt; page.txt &gt; page.html</td>
<td valign="top" width="52%">convert a text file to html</td>
</tr>
<tr>
<td valign="top" width="48%"># recode -l | more</td>
<td valign="top" width="52%">show all available formats conversion</td>
</tr>
<tr>
<td valign="top" width="48%"># restore -if /tmp/home0.bak</td>
<td valign="top" width="52%">restoring a backup interactively</td>
</tr>
<tr>
<td valign="top" width="48%"># rm -f file1</td>
<td valign="top" width="52%">delete file called &#8216;file1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># rm -rf dir1</td>
<td valign="top" width="52%">remove a directory called &#8216;dir1&#8217; and contents recursively</td>
</tr>
<tr>
<td valign="top" width="48%"># rm -rf dir1 dir2</td>
<td valign="top" width="52%">remove two directories and their contents recursively</td>
</tr>
<tr>
<td valign="top" width="48%"># rmdir dir1</td>
<td valign="top" width="52%">delete directory called &#8216;dir1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># route -n</td>
<td valign="top" width="52%">show routing table</td>
</tr>
<tr>
<td valign="top" width="48%"># route add -net 0/0 gw IP_Gateway</td>
<td valign="top" width="52%">configure default gateway</td>
</tr>
<tr>
<td valign="top" width="48%"># route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1</td>
<td valign="top" width="52%">configure static route to reach network &#8216;192.168.0.0/16&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># route del 0/0 gw IP_gateway</td>
<td valign="top" width="52%">remove static route</td>
</tr>
<tr>
<td valign="top" width="48%"># echo &#8220;1&#8221; &gt; /proc/sys/net/ipv4/ip_forward</td>
<td valign="top" width="52%">activate ip routing temporarily</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -q -a &#8211;qf &#8216;%10{SIZE}t%{NAME}n&#8217; | sort -k1,1n</td>
<td valign="top" width="52%">show the used space by rpm packages installed sorted by size (fedora, redhat and alike)</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -ivh [package.rpm]</td>
<td valign="top" width="52%">install a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -ivh &#8211;nodeeps [package.rpm]</td>
<td valign="top" width="52%">install a rpm package ignoring dependencies requests   [</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -U [package.rpm]</td>
<td valign="top" width="52%">upgrade a rpm package without changing configuration files</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -F [package.rpm]</td>
<td valign="top" width="52%">upgrade a rpm package only if it is already installed</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -e [package]</td>
<td valign="top" width="52%">remove a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qa</td>
<td valign="top" width="52%">show all rpm packages installed on the system</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qa | grep httpd</td>
<td valign="top" width="52%">show all rpm packages with the name &#8220;httpd&#8221;</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qi [package]</td>
<td valign="top" width="52%">obtain information on a specific package installed   [<a title="Get more informations about this command from the official Linux Man Page" href="http://www.linuxguide.it/command_line/linux-manpage/do.php?file=rpm" target="_blank" rel="noopener">man</a>]</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qg &#8220;System Environment/Daemons&#8221;</td>
<td valign="top" width="52%">show rpm packages of a group software</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -ql [package]</td>
<td valign="top" width="52%">show list of files provided by a rpm package installed</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qc [package]</td>
<td valign="top" width="52%">show list of configuration files provided by a rpm package installed</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -q [package] &#8211;whatrequires</td>
<td valign="top" width="52%">show list of dependencies required for a rpm packet</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -q [package] &#8211;whatprovides</td>
<td valign="top" width="52%">show capability provided by a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -q [package] &#8211;scripts</td>
<td valign="top" width="52%">show scripts started during installation / removal</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -q [package] &#8211;changelog</td>
<td valign="top" width="52%">show history of revisions of a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qf /etc/httpd/conf/httpd.conf</td>
<td valign="top" width="52%">verify which rpm package belongs to a given file</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qp [package.rpm] -l</td>
<td valign="top" width="52%">show list of files provided by a rpm package not yet installed</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm &#8211;import /media/cdrom/RPM-GPG-KEY</td>
<td valign="top" width="52%">import public-key digital signature</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm &#8211;checksig [package.rpm]</td>
<td valign="top" width="52%">verify the integrity of a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -qa gpg-pubkey</td>
<td valign="top" width="52%">verify integrity of all rpm packages installed</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -V [package]</td>
<td valign="top" width="52%">check file size, permissions, type, owner, group, MD5 checksum and last modification</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -Va</td>
<td valign="top" width="52%">check all rpm packages installed on the system &#8211; use with caution</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -Vp [package.rpm]</td>
<td valign="top" width="52%">verify a rpm package not yet installed</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm -ivh /usr/src/redhat/RPMS/`arch`/[package.rpm]</td>
<td valign="top" width="52%">install a package built from a rpm source</td>
</tr>
<tr>
<td valign="top" width="48%"># rpm2cpio [package.rpm] | cpio &#8211;extract &#8211;make-directories *bin*</td>
<td valign="top" width="52%">extract executable file from a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># rpmbuild &#8211;rebuild [package.src.rpm]</td>
<td valign="top" width="52%">build a rpm package from a rpm source</td>
</tr>
<tr>
<td valign="top" width="48%"># rsync -rogpav &#8211;delete /home /tmp</td>
<td valign="top" width="52%">synchronization between directories</td>
</tr>
<tr>
<td valign="top" width="48%"># rsync -rogpav -e ssh &#8211;delete /home ip_address:/tmp</td>
<td valign="top" width="52%">rsync via SSH tunnel</td>
</tr>
<tr>
<td valign="top" width="48%"># rsync -az -e ssh &#8211;delete ip_addr:/home/public /home/local</td>
<td valign="top" width="52%">synchronize a local directory with a remote directory via ssh and compression</td>
</tr>
<tr>
<td valign="top" width="48%"># rsync -az -e ssh &#8211;delete /home/local ip_addr:/home/public</td>
<td valign="top" width="52%">synchronize a remote directory with a local directory via ssh and compression</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">S     Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># sdiff file1 file2</td>
<td valign="top" width="52%">find differences between two files and merge interactively alike &#8220;diff&#8221;</td>
</tr>
<tr>
<td valign="top" width="48%"># sed &#8216;s/string1/string2/g&#8217; example.txt</td>
<td valign="top" width="52%">replace &#8220;string1&#8221; with &#8220;string2&#8221; in example.txt</td>
</tr>
<tr>
<td valign="top" width="48%"># sed &#8216;/^$/d&#8217; example.txt</td>
<td valign="top" width="52%">remove all blank lines from example.txt</td>
</tr>
<tr>
<td valign="top" width="48%"># sed &#8216;/ *#/d; /^$/d&#8217; example.txt</td>
<td valign="top" width="52%">remove comments and blank lines from example.txt</td>
</tr>
<tr>
<td valign="top" width="48%"># sed -e &#8216;1d&#8217; exampe.txt</td>
<td valign="top" width="52%">eliminates the first line from file example.txt</td>
</tr>
<tr>
<td valign="top" width="48%"># sed -n &#8216;/string1/p&#8217;</td>
<td valign="top" width="52%">view only lines that contain the word &#8220;string1&#8221;</td>
</tr>
<tr>
<td valign="top" width="48%"># sed -e &#8216;s/ *$//&#8217; example.txt</td>
<td valign="top" width="52%">remove empty characters at the end of each row</td>
</tr>
<tr>
<td valign="top" width="48%"># sed -e &#8216;s/string1//g&#8217; example.txt</td>
<td valign="top" width="52%">remove only the word &#8220;string1&#8221; from text and leave intact all</td>
</tr>
<tr>
<td valign="top" width="48%"># sed -n &#8216;1,5p&#8217; example.txt</td>
<td valign="top" width="52%">print from 1th to 5th row of example.txt</td>
</tr>
<tr>
<td valign="top" width="48%"># sed -n &#8216;5p;5q&#8217; example.txt</td>
<td valign="top" width="52%">print row number 5 of example.txt</td>
</tr>
<tr>
<td valign="top" width="48%"># sed -e &#8216;s/00*/0/g&#8217; example.txt</td>
<td valign="top" width="52%">replace more zeros with a single zero</td>
</tr>
<tr>
<td valign="top" width="48%"># shutdown -h now</td>
<td valign="top" width="52%">shutdown system(1)</td>
</tr>
<tr>
<td valign="top" width="48%"># shutdown -h 16:30 &amp;</td>
<td valign="top" width="52%">planned shutdown of the system at 16:30</td>
</tr>
<tr>
<td valign="top" width="48%"># shutdown -c</td>
<td valign="top" width="52%">cancel a planned shutdown of the system</td>
</tr>
<tr>
<td valign="top" width="48%"># shutdown -r now</td>
<td valign="top" width="52%">reboot(1)</td>
</tr>
<tr>
<td valign="top" width="48%"># smartctl -A /dev/hda</td>
<td valign="top" width="52%">monitoring reliability of a hard-disk through SMART</td>
</tr>
<tr>
<td valign="top" width="48%"># smartctl -i /dev/hda</td>
<td valign="top" width="52%">check if SMART is active on a hard-disk</td>
</tr>
<tr>
<td valign="top" width="48%"># smbclient -L ip_addr/hostname</td>
<td valign="top" width="52%">show remote shares of a windows host</td>
</tr>
<tr>
<td valign="top" width="48%"># smbget -Rr smb://ip_addr/share</td>
<td valign="top" width="52%">like wget can download files from a host windows via smb</td>
</tr>
<tr>
<td valign="top" width="48%"># sort file1 file2</td>
<td valign="top" width="52%">sort contents of two files</td>
</tr>
<tr>
<td valign="top" width="48%"># sort file1 file2 | uniq</td>
<td valign="top" width="52%">sort contents of two files omitting lines repeated</td>
</tr>
<tr>
<td valign="top" width="48%"># sort file1 file2 | uniq -u</td>
<td valign="top" width="52%">sort contents of two files by viewing only unique line</td>
</tr>
<tr>
<td valign="top" width="48%"># sort file1 file2 | uniq -d</td>
<td valign="top" width="52%">sort contents of two files by viewing only duplicate line</td>
</tr>
<tr>
<td valign="top" width="48%"># strace -c ls &gt;/dev/null</td>
<td valign="top" width="52%">display system calls made and received by a process</td>
</tr>
<tr>
<td valign="top" width="48%"># strace -f -e open ls &gt;/dev/null</td>
<td valign="top" width="52%">display library calls</td>
</tr>
<tr>
<td valign="top" width="48%"># swapon /dev/hda3</td>
<td valign="top" width="52%">activating a new swap partition</td>
</tr>
<tr>
<td valign="top" width="48%"># swapon /dev/hda2 /dev/hdb3</td>
<td valign="top" width="52%">activate two swap partitions</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">T    Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># tac file1</td>
<td valign="top" width="52%">view the contents of a file starting from the last line</td>
</tr>
<tr>
<td valign="top" width="48%"># tail -2 file1</td>
<td valign="top" width="52%">view last two lines of a file</td>
</tr>
<tr>
<td valign="top" width="48%"># tail -f /var/log/messages</td>
<td valign="top" width="52%">view in real time what is added to a file</td>
</tr>
<tr>
<td valign="top" width="48%"># tail /var/log/dmesg</td>
<td valign="top" width="52%">show events inherent to the process of booting kernel</td>
</tr>
<tr>
<td valign="top" width="48%"># tail /var/log/messages</td>
<td valign="top" width="52%">show system events</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -cvf archive.tar file1</td>
<td valign="top" width="52%">create a uncompressed tarball</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -cvf archive.tar file1 file2 dir1</td>
<td valign="top" width="52%">create an archive containing &#8216;file1&#8217;, &#8216;file2&#8217; and &#8216;dir1&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -tf archive.tar</td>
<td valign="top" width="52%">show contents of an archive</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -xvf archive.tar</td>
<td valign="top" width="52%">extract a tarball</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -xvf archive.tar -C /tmp</td>
<td valign="top" width="52%">extract a tarball into / tmp</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -cvfj archive.tar.bz2 dir1</td>
<td valign="top" width="52%">create a tarball compressed into bzip2</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -xvfj archive.tar.bz2</td>
<td valign="top" width="52%">decompress a compressed tar archive in bzip2</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -cvfz archive.tar.gz dir1</td>
<td valign="top" width="52%">create a tarball compressed into gzip</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -xvfz archive.tar.gz</td>
<td valign="top" width="52%">decompress a compressed tar archive in</td>
</tr>
<tr>
<td valign="top" width="48%"># tar -Puf backup.tar /home/user</td>
<td valign="top" width="52%">make a incremental backup of directory &#8216;/home/user&#8217;</td>
</tr>
<tr>
<td valign="top" width="48%"># ( cd /tmp/local/ &amp;&amp; tar c . ) | ssh -C user@ip_addr &#8216;cd /home/share/ &amp;&amp; tar x -p&#8217;</td>
<td valign="top" width="52%">copy content of a directory on remote directory via ssh</td>
</tr>
<tr>
<td valign="top" width="48%"># ( tar c /home ) | ssh -C user@ip_addr &#8216;cd /home/backup-home &amp;&amp; tar x -p&#8217;</td>
<td valign="top" width="52%">copy a local directory on remote directory via ssh</td>
</tr>
<tr>
<td valign="top" width="48%"># tar cf &#8211; . | (cd /tmp/backup ; tar xf &#8211; )</td>
<td valign="top" width="52%">local copy preserving permits and links from a directory to another</td>
</tr>
<tr>
<td valign="top" width="48%"># tcpdump tcp port 80</td>
<td valign="top" width="52%">show all HTTP traffic</td>
</tr>
<tr>
<td valign="top" width="48%"># telinit 0</td>
<td valign="top" width="52%">shutdown system(3)</td>
</tr>
<tr>
<td valign="top" width="48%"># top</td>
<td valign="top" width="52%">display linux tasks using most cpu</td>
</tr>
<tr>
<td valign="top" width="48%"># touch -t 0712250000 file1</td>
<td valign="top" width="52%">modify timestamp of a file or directory &#8211; (YYMMDDhhmm)</td>
</tr>
<tr>
<td valign="top" width="48%"># echo &#8216;word&#8217; | tr &#8216;[:lower:]&#8217; &#8216;[:upper:]&#8217;</td>
<td valign="top" width="52%">convert from lower case in upper case</td>
</tr>
<tr>
<td valign="top" width="48%"># tree</td>
<td valign="top" width="52%">show files and directories in a tree starting from root(1)</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">U   Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># umount /dev/hda2</td>
<td valign="top" width="52%">unmount disk called hda2 &#8211; exit from mount point &#8216;/ mnt/hda2&#8217; first</td>
</tr>
<tr>
<td valign="top" width="48%"># umount -n /mnt/hda2</td>
<td valign="top" width="52%">run umount without writing the file /etc/mtab &#8211; useful when the file is read-only or the hard disk is full</td>
</tr>
<tr>
<td valign="top" width="48%"># uname -m</td>
<td valign="top" width="52%">show architecture of machine(2)</td>
</tr>
<tr>
<td valign="top" width="48%"># uname -r</td>
<td valign="top" width="52%">show used kernel version</td>
</tr>
<tr>
<td valign="top" width="48%"># unix2dos fileunix.txt filedos.txt</td>
<td valign="top" width="52%">convert a text file format from UNIX to MSDOS</td>
</tr>
<tr>
<td valign="top" width="48%"># unrar x file1.rar</td>
<td valign="top" width="52%">decompress rar archive</td>
</tr>
<tr>
<td valign="top" width="48%"># unzip file1.zip</td>
<td valign="top" width="52%">decompress a zip archive</td>
</tr>
<tr>
<td valign="top" width="48%"># useradd -c &#8220;User Linux&#8221; -g admin -d /home/user1 -s /bin/bash user1</td>
<td valign="top" width="52%">create a new user &#8220;user1&#8221; belongs &#8220;admin&#8221; group</td>
</tr>
<tr>
<td valign="top" width="48%"># useradd user1</td>
<td valign="top" width="52%">create a new</td>
</tr>
<tr>
<td valign="top" width="48%"># userdel -r user1</td>
<td valign="top" width="52%">delete a user ( &#8216;-r&#8217; eliminates home directory)</td>
</tr>
<tr>
<td valign="top" width="48%"># usermod -c &#8220;User FTP&#8221; -g system -d /ftp/user1 -s /bin/nologin user1</td>
<td valign="top" width="52%">change user attributes as description, group and other</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">W    Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># watch -n1 &#8216;cat /proc/interrupts&#8217;</td>
<td valign="top" width="52%">display interrupts in real-time</td>
</tr>
<tr>
<td valign="top" width="48%"># wget -r www.example.com</td>
<td valign="top" width="52%">download an entire web site</td>
</tr>
<tr>
<td valign="top" width="48%"># wget -c www.example.com/file.iso</td>
<td valign="top" width="52%">download a file with the ability to stop the download and resume later</td>
</tr>
<tr>
<td valign="top" width="48%"># echo &#8216;wget -c www.example.com/files.iso&#8217; | at 09:00</td>
<td valign="top" width="52%">start a download at any given time</td>
</tr>
<tr>
<td valign="top" width="48%"># whatis &#8230;keyword</td>
<td valign="top" width="52%">displays description of what a program does</td>
</tr>
<tr>
<td valign="top" width="48%"># whereis halt</td>
<td valign="top" width="52%">show location of a binary file, source or man</td>
</tr>
<tr>
<td valign="top" width="48%"># which halt</td>
<td valign="top" width="52%">show full path to a binary / executable</td>
</tr>
<tr>
<td valign="top" width="48%"># who -a</td>
<td valign="top" width="52%">show who is logged on, and print: time of last system boot, dead processes, system login processes, active processes spawned by init, current runlevel, last system clock change</td>
</tr>
<tr>
<td valign="top" width="48%"># whois www.example.com</td>
<td valign="top" width="52%">lookup on Whois database</td>
</tr>
</tbody>
</table>
<table border="1" width="99%" cellpadding="0">
<tbody>
<tr>
<td width="48%">Y   Command</td>
<td width="52%">Description</td>
</tr>
<tr>
<td valign="top" width="48%"># yum -y install [package]</td>
<td valign="top" width="52%">download and install a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># yum localinstall [package.rpm]</td>
<td valign="top" width="52%">That will install an RPM, and try to resolve all the dependencies for you using your repositories.</td>
</tr>
<tr>
<td valign="top" width="48%"># yum -y update</td>
<td valign="top" width="52%">update all rpm packages installed on the system</td>
</tr>
<tr>
<td valign="top" width="48%"># yum update [package]</td>
<td valign="top" width="52%">upgrade a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># yum remove [package]</td>
<td valign="top" width="52%">remove a rpm package</td>
</tr>
<tr>
<td valign="top" width="48%"># yum list</td>
<td valign="top" width="52%">list all packages installed on the system</td>
</tr>
<tr>
<td valign="top" width="48%"># yum search [package]</td>
<td valign="top" width="52%">find a package on rpm repository</td>
</tr>
<tr>
<td valign="top" width="48%"># yum clean [package]</td>
<td valign="top" width="52%">clean up rpm cache erasing downloaded packages</td>
</tr>
<tr>
<td valign="top" width="48%"># yum clean headers</td>
<td valign="top" width="52%">remove all files headers that the system uses to resolve dependency</td>
</tr>
<tr>
<td valign="top" width="48%"># yum clean all</td>
<td valign="top" width="52%">remove from the cache packages and headers files</td>
</tr>
</tbody>
</table>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
