EFY Times  
Sunday, September 21, 2014

 
GO
 
 
Here's A List Of 83 Linux Commands For Beginners!
 
Home >> Infotech >> Features
 
 
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.

Viewing, copying, moving and deleting files

ls Display the contents of the current directory
ls -a Display also hidden files and hidden directories
   
cp filename /path/dir_name Copy filename into directory /path/dir_name
cp -r dir_name /path/dir_name2 Copy the entire dir_name into /path/dir_name2
cp filename1 filename2 /path/dir_name Copy filename1 and filename2 into /path/dir_name
   
rm name Remove a file or directory called name
rm -r name Remove an entire directory as well as its included files and subdirectories
   
mv filename /path/dir_name Move filename into /path/dir_name
mv filename1 filename2 Rename filename1 to filename2
   
cat filename Display filenames contents
   
more filename Display filename in pages. Use spacebar to view next page
   
head filename Display filenames first 10 lines
head -15 filename Display filenames first 15 lines
   
tail filename Display filenames last 10 lines
tail -15 filename Display filenames last 15 lines
   
pwd Display current directory
   
cd /path/dir_name Change to directory /path/dir_name
cd .. Go 1 directory up
   
mkdir dir_name Create directory dir_name
rmdir dir_name Delete directory dir_name

 

Finding files and text within files

updatedb Update (create first time used) a database of all files under the root directory /
locate filename Find file filename searching in the database
   
find / -name filename Starting from the root directory search for the file called filename
find / -name *filename Same as above but search for file containing the string filename
   
grep string /path/dir_name Starting from /path/dir_name search for all files containing string
   
which application_name Search $path for application app_name
whereis application_name Search $path, man pages and source files for application_name

 

Archived files

Decompress

tar -xzf filename.tgz Decompress tzg file
tar -xzf filename.tar.gz Decompress tar.gz file
tar -xjf filename.tar.bz2 Decompress tar.bz2 file

 

Compress

tar -czf filename.tar /path/dir_name Compress directory /path/dir_name to filename.tar
gzip -c filename > filename.gz Compress /path/dir_name to filename.tar.gz
bzip2 -c filename > filename.bz2 Compress /path/dir_name to filename.tar.bz2

 

Using rpm files 

rpm -hiv package.rpm Install rpm called package.rpm
rpm -hiv --force package.rpm Install rpm called package.rpm by force
rpm -hUv package.rpm Upgrade rpm called package.rpm
rpm -e package.rpm Delete rpm called package.rpm
rpm -qpil package.rpm List files in not-installed rpm called package.rpm
rpm -ql package.rpm List files in installed rpm called package.rpm
rpm -q str List installed rpms containing the string str
rpm -qf /path/application_name Display the rpm that contains application application_name

 

Starting and Stoping 

startx Start the X system
shutdown -h now Shutdown the system now and do not reboot
halt
Same as above
shutdown -r now Reboot
reboot Same as above
shutdown -r +10 Reboot in 10 minutes

   

Mounting filesystems

mount -t vfat /dev/sd(a)(1) /mnt/c_drive Mount 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/cdrom Mount cdrom under /mnt/cdrom directory
   
umount /mnt/hda1 Unmout the above

 

User administration

users Display users currently logged in
adduser username Create a new user called username
passwd username Define password for user called username
who List logged-in users
whoami Display current user
finger username Displays info about user username
su Log in as root from current login
su - Log in as root from current login and take root's path
exit Exit from console login (ie, logout).

 

Processes 

command Execute command in the foreground
command & Execute command in the background
ctrl+z Suspend a program
ctrl+c Interrupt a program
ps List all processes
kill -9 pid Kill process with id pid
top Monitor processes in real time

 

Networking 

hostname List the system's hostname
ifconfig Set/Display network information
host ip Resolves ip's hostname
ping ip/hostname Check if ip/hostname is reachable
traceroute ip/hostname Find network path to ip/hostname

   

System Information

uname -a General system information
fdisk -l List partition tables
cp filename /path/dir_name Copy filename into directory /path/dir_name
df -T -h List filesystem disk space usage
lspci List PCI devices
lsusb List USB devices
free -m Display RAM+Swap usage

 

Program Compile

gcc -o output file.c Compile a C program
./output Run a C program you have compiled
g++ -o output file.cpp Compile a C++ program
./output Run a C++ program you have compiled
./configure && make && su -c 'make install' Configure, compile and install a program with Makefile

List Courtesy: my-guides
 
 
Rate this news:  (14 Votes)

Print Email Post Comment 
(Total Views: 23554)
Share
 
 
 
Infotech News
   
Narayan Laksham Ultriva CEO Discussed Exception Driven Management In Demand Driven Technology Solutions
Textstr Sets Web Texting Standard With New Features To Send PDFs And Images
Innovation Direct To Serve As Official Marketing And Licensing Representative For Anthony's Convenient Land Line System Invention
ADDASOUND & 1450, Inc. Sign Distribution Agreement
VIZMATRIX Launches IndieGoGo Crowdfunding Campaign To Roll-Out Interactive Strategy Visualization And Business Intelligence Cloud Service
 
Most popular
 

Daily

Huawei And China Telecom Complete The Industry’s First Live Network vCPE Test
Narayan Laksham Ultriva CEO Discussed Exception Driven Management In Demand Driven Technology Solutions
VIZMATRIX Launches IndieGoGo Crowdfunding Campaign To Roll-Out Interactive Strategy Visualization And Business Intelligence Cloud Service
ShopClues.com Unveils New Logo & Website User Interface To Strengthen Foothold
Tata Docomo Introduces Connected Lifestyles With High Speed Broadband In Bangalore
Littelfuse Startco Is Hosting A One-Day Technical Seminar In Toronto, Ontario On Improving Electrical Safety In Energy And Mining Operations
Innovation Direct To Serve As Official Marketing And Licensing Representative For Anthony's Convenient Land Line System Invention
ADDASOUND & 1450, Inc. Sign Distribution Agreement
Textstr Sets Web Texting Standard With New Features To Send PDFs And Images
CEA Congratulates Robert Holleyman On Confirmation As Deputy USTR
 
   

Weekly

15 Skills That Make You A Real Geek!
10 Must-Have Free Software In Your PC
Learn How To Create Animations Without jQuery
5 Points You Need To Remember The Most About Diodes
Arrow Inspires Channel Partners At Big Data Symposium
5 Online Tutorials For Ethical Hacking
12 Rules To Follow To Create Quality Code
Best 10 CSS Editing Tools For Programmers And Web Developers
Image Of First Microsoft Phone Without Nokia Branding, Leaked
5 Reasons Why You Need Bash Scripting
Top 18 Android KitKat Smartphones Available In India!
SanDisk Continues Momentum In Pro Video Industry, Delivering Leading-Edge Capture And Storage Technologies
Top 10 Books On Computer Network Security
Best 10 Live CDs For Network Security On Linux Distributions
10 Reasons Why You'll Find JavaScript As The Best Language For Web Development
Microsoft-SAP New Partnership To Bring Cloud And Mobile Services To India
 
   

Overall

Agility Systems Deals in:

Document Management System for law firms
Features
Top 10 Video Tutorials For HTML5 Beginners
HTML 5 has been introduced with some better specifications than its predecessors, and it introduces mark-up and application programming interfaces for...
10 Best Free Blogging Platforms For Bloggers!
We here provide a list here of 10 best free blogging platforms which are packed with exciting features....
Top 10 Drupal Video Tutorials For Beginners
Drupal is quite important for developers and if you are just planning to start with Drupal, then here are some best online tutorials for you....
10 Helpful Must-Know Facts For Git Beginners
It's open source but it offers such features and options which are enough to baffle beginners. Here we provide a list of tips and tricks which will he...
10 Best Alternatives To WordPress Blogging Platform
Though WordPress is a great platform to use by bloggers, there are some great alternatives to it too, which may fulfill your requirements in a much be...
10 Best Programming Fonts For Coders
Sometimes you're happy with the default monopaced font, which is not always best for you. There are several free fonts for programmers and coders arou...
7 Best User Interfaces For Web Designing
The look and feel of a UI is definitely important but the most important factor is its functionability in terms of navigation....
Switching To Linux From Windows? Keep These 10 Facts In Mind
It's true that it's difficult to shift to Linux from Windows. But it's not impossible. You just need to remember 10 basic points while making this swi...
10 Reasons Why You'll Find JavaScript As The Best Language For Web Development
Developers love to use JavaScript and here are the best 10 reasons why you need to learn JavaScript for your web development aspirations....
Top 10 Books On Computer Network Security
To enhance your knowledge about computer security, here we provide a list of best 10 books which will help in your better understanding of the domain....
5 Points You Need To Remember The Most About Diodes
If you are working with electrical or electronics circuits, then you can't forget the basic operations and requirements of diodes. Here we present a b...
Top 10 Download Managers For Linux To Make Download Faster
There are loads of choices for you, if you are looking for the best open source download managers for Linux but selection becomes quite difficult. Her...
Best 10 Live CDs For Network Security On Linux Distributions
Live CDs load into the memory and access your operating system and other tools, without any permanent installation on the machine....
5 Online Tutorials For Ethical Hacking
Hacking is not always a malpractice. Ethical hacking is also an integral part of it and when it's associated with penetration testing, your computer s...
5 Reasons Why You Need Bash Scripting
If you want to learn terminal commands, it's best that you learn bash scripts and cron jobs....
 
  View All
Dialogue
 
10 Questions That Google Never Asks While Hiring!
Here is a list of 10 questions that Google just banned from their interviews....
For Enjay, Open Source Technology Is A Way Of Life
An entirely open source-based company, Enjay IT Solutions, has built itself a reputation in the OSS domain....
Switching To Tizen Doesn’t Mean We Are Abandoning Android: Samsung
The company has worked to build Tizen up from scratch and has now introduced it to developers and the general public with its latest range of wearable...
Venturing Into The Cloud? Develop A Customised Cloud Strategy First!
Diksha P Gupta speaks to Rushikesh Jadhav, cloud evangelist, ESDS Software Solution Pvt Ltd, on how the cloud has changed the way compan...
HTC Is Strong And There Are No Plans Of Sale Now Or In Future, Says HTC's Senior Director-Marketing
Atithya Amaresh from EFYTimes had an exclusive chat with Sirpa H. Ikola, senior director, Marketing, South Asia, HTC about its devices and its plans w...
   
  View All
Videos
 
First Look: LG Optimus G
The phone sports a high-end display and comes powered by a powerful processor. ...
Create QR-Codes For Free
TEC-IT releases the freeware QR-Code Studio to provide a quick and convenient way of QR code creation for every application scenario....
DoT Secretary Shares Plans For Growth Of Telecom Sector
M.F. Farooqui has recently taken charge as secretary, Department of Telecom....
Hands-On: Sony Xperia Z
Xperia Z is Sony's first entrant model in the big-screen smartphone category. ...
Hands On: Videocon A30 Smartphone
Videocon, the consumer electronics company which is known for its refrigerators, washing machine and air-conditioner has unveiled its Android-based sm...
   
View All
   
 
IFA 2014
 
IFA 2014: LG Launches 34-Inches Curved Monitor
The company is yet to confirm price and availability of the device....
IFA 2014: Intel Launches First Core M Range Of Processors
This range of processors is tailor-made for 2-in-1 devices which include a tablet and a laptop....
MWC 2014: Tablet Lets People Feel Textures On Its Screen
Now feel what you see on your tablet, by way of ultrasonic waves....
MWC 2014: 4K Android Tablet Games To Kill Consoles, iPad
Tablet makers like Samsung want to beat the iPad by making 4K tabs. ...
MWC 2014: This Vodafone Backpack Helps Get Network In Disaster Situations
Two engineers of Vodafone New Zealand displayed the "mini" mobile network by Vodafone substructure in a backpack. ...
MWC 2014: Wilocity Chipset To Bring 'Lightening' Speed To Mobile Phones
Wilocity has developed a WiGig chipset for mobile phones that will bring lightning-fast wireless capability ...
MWC 2014: Samsung Introduces Octacore, Hexacore Chipsets
The Korean giant, Samsung unveiled two new octacore and hexacore chipsets at MWC 2014, in Barcelona. The company previously used Exynos 5 Octa 5410 ch...
   
View All
   
 
Events
 
19th Consumer Electronic Imaging Fair To Be Held On ...

View All
   
   
 
 

home archives contact us advertise with us
           
Magazines Portals Directories Events News Verticals Educational Institute  
Electronics for You
Open Source for You
Electronics Bazaar
electronicsforu.com
efytimes.com
opensourceforu.com
electronicsb2b.com
Electronics Annual Guide
EFY EXPO INDIA
EFY EXPO WEST
ELECTRONICS ROCKS
EFY Awards
OSIDAYS Expo
Electronics
Infotech
Linux & Open Source
Consumer Electronics
Science & Technology
BPO
EFY Techcenter

Educational Kits
Kitsnspares.com  
 
 
© Copyright 2014 EFY Enterprises Pvt. Ltd.
All rights reserved. Reproduction in whole or in part in any form or medium without written permission is prohibited.
Usage of the content from the web site is subject to Terms and Conditions