Here's A List Of 83 Linux Commands For Beginners!
Autor: Gabriel Costa | Publicado: 2014-02-23T08:46:00-08:00

Here's A List Of 83 Linux Commands For Beginners!Switching to Linux was a wonderful decision, now it's time to explore its power - the command line!
So you have just switched to Linux and trying to figure out what was the fuss about the command prompt as the most powerful tool. Well here's a list of Linux commands for a beginner to help you get a glimpse of what the command prompt can do for you.&nbsp;Viewing,&nbsp;copying, moving and deleting files
lsDisplay the contents of the current directory
ls -aDisplay also hidden files and hidden directories
&nbsp;&nbsp;
cp filename /path/dir_nameCopy filename into directory /path/dir_name
cp -r dir_name /path/dir_name2Copy the entire dir_name into /path/dir_name2
cp filename1 filename2 /path/dir_nameCopy filename1 and filename2 into /path/dir_name
&nbsp;&nbsp;
rm nameRemove a file or directory called name
rm -r nameRemove an entire directory as well as its included files and subdirectories
&nbsp;&nbsp;
mv filename /path/dir_nameMove filename into /path/dir_name
mv filename1 filename2Rename filename1 to filename2
&nbsp;&nbsp;
cat filenameDisplay filenames contents
&nbsp;&nbsp;
more filenameDisplay filename in pages. Use spacebar to view next page
&nbsp;&nbsp;
head filenameDisplay filenames first 10 lines
head -15 filenameDisplay filenames first 15 lines
&nbsp;&nbsp;
tail filenameDisplay filenames last 10 lines
tail -15 filenameDisplay filenames last 15 lines
&nbsp;&nbsp;
pwdDisplay current directory
&nbsp;&nbsp;
cd /path/dir_nameChange to directory /path/dir_name
cd ..Go 1 directory up
&nbsp;&nbsp;
mkdir dir_nameCreate directory dir_name
rmdir dir_nameDelete directory dir_name
Finding&nbsp;files and text within files
updatedbUpdate (create first time used) a database of all files under the root directory /
locate filenameFind file filename searching in the database
&nbsp;&nbsp;
find / -name filenameStarting from the root directory search for the file called filename
find / -name *filenameSame as above but search for file containing the string filename
&nbsp;&nbsp;
grep string /path/dir_nameStarting from /path/dir_name search for all files containing string
&nbsp;&nbsp;
which application_nameSearch $path for application app_name
whereis application_nameSearch $path, man pages and source files for application_name
Archived&nbsp;filesDecompress
tar -xzf filename.tgzDecompress tzg file
tar -xzf filename.tar.gzDecompress tar.gz file
tar -xjf filename.tar.bz2Decompress tar.bz2 file
Compress
tar -czf filename.tar /path/dir_nameCompress directory /path/dir_name to filename.tar
gzip -c filename &gt; filename.gzCompress /path/dir_name to filename.tar.gz
bzip2 -c filename &gt; filename.bz2Compress /path/dir_name to filename.tar.bz2
Using&nbsp;rpm files&nbsp;
rpm -hiv package.rpmInstall rpm called package.rpm
rpm -hiv --force package.rpmInstall rpm called package.rpm by force
rpm -hUv package.rpmUpgrade rpm called package.rpm
rpm -e package.rpmDelete rpm called package.rpm
rpm -qpil package.rpmList files in not-installed rpm called package.rpm
rpm -ql package.rpmList files in installed rpm called package.rpm
rpm -q strList installed rpms containing the string str
rpm -qf /path/application_nameDisplay the rpm that contains application application_name
Starting&nbsp;and Stoping&nbsp;
startxStart the X system
shutdown -h nowShutdown the system now and do not reboot
haltSame as above
shutdown -r nowReboot
rebootSame as above
shutdown -r +10Reboot in 10 minutes
&nbsp; &nbsp;Mounting&nbsp;filesystems
mount -t vfat /dev/sd(a)(1) /mnt/c_driveMount the first partition 1 of the first hard disk drive a which is in fat32 vfat dormat under /mnt/c_drive directory
mount -t iso9660 /dev/cdrom /mnt/cdromMount cdrom under /mnt/cdrom directory
&nbsp;&nbsp;
umount /mnt/hda1Unmout the above
User&nbsp;administration
usersDisplay users currently logged in
adduser usernameCreate a new user called username
passwd usernameDefine password for user called username
whoList logged-in users
whoamiDisplay current user
finger usernameDisplays info about user username
suLog in as root from current login
su -Log in as root from current login and take root's path
exitExit from console login (ie, logout).
Processes&nbsp;
commandExecute command in the foreground
command &amp;Execute command in the background
ctrl+zSuspend a program
ctrl+cInterrupt a program
psList all processes
kill -9 pidKill process with id pid
topMonitor processes in real time
Networking&nbsp;
hostnameList the system's hostname
ifconfigSet/Display network information
host ipResolves ip's hostname
ping ip/hostnameCheck if ip/hostname is reachable
traceroute ip/hostnameFind network path to ip/hostname
&nbsp; &nbsp;System&nbsp;Information
uname -aGeneral system information
fdisk -lList partition tables
cp filename /path/dir_nameCopy filename into directory /path/dir_name
df -T -hList filesystem disk space usage
lspciList PCI devices
lsusbList USB devices
free -mDisplay RAM+Swap usage
Program&nbsp;Compile
gcc -o output file.cCompile a C program
./outputRun a C program you have compiled
g++ -o output file.cppCompile a C++ program
./outputRun a C++ program you have compiled
./configure &amp;&amp; make &amp;&amp; su -c 'make install'Configure, compile and install a program with Makefile
List Courtesy: my-guides
Fonte:&nbsp;Here's A List Of 83 Linux Commands For Beginners!