Linux Classes
Linux Training
* Linux Classes *

LINUX CLASSES - LINUX COMMANDS

What Are The Most Important Linux Commands?

Working from a Linux command line is not always intuitive, especially since there are hundreds of different commands with a myriad of switches and flags to make things even more confusing. You certainly don't need to know all of them to make good use of your Linux system, but there is a certain set of indispensable tools with which you should be familiar.

We've covered a handful of commands in previous sections that let you work with the shell and your file system. The commands covered in this section will complement what you've learned and give you some essential tools to manage your Linux environment. (You'll also be able to use these commands on other Unix-based systems.) You'll pick up other important commands in the "Text Editors" and "Slicing and Dicing" sections but you should first master this starter set to build the skills that will help you perform common Linux tasks more easily.

If You Need Help, Ask the man

Assuming you can remember the right command for a particular job, it's tougher still to remember all the switches associated with that command. The man command (short for manual) will help you on both counts by displaying pages from online manuals and telling you which commands may be relevant to the task at hand.

Say you want to change your password, but you don't know the command to do it. You can use the man command plus the keyword flag, -k, to search by keyword password for relevant commands:

man -k password
passwd passwd (1) - change login password
pwck pwck (1m) - password/group file checkers
vipw vipw (1b) - edit the password file

You can probably deduce that passwd is the correct command. But before blindly issuing any Linux command, you should know the proper syntax and understand what the command might do to you first. Using man with a command name will display all you need to know (probably more) about a command. For example, entering

man passwd

will display

passwd(1) User Commands passwd(1)
NAME
passwd - change login password and attributes
SYNOPSIS
passwd [ name ]
passwd [ -d | -l ] [ -f ] [ -n min ] [ -w warn ]
[ -x max ] name
passwd -s [ -a ]
passwd -s [ name ]

DESCRIPTION
The passwd command changes the password or lists
attributes associated with the user's login name.
--More--(5%)

(The man command pauses after each screenful and waits for you to press the spacebar before continuing.) The word More at the bottom of each page indicates how much of the help has so far been displayed. The terms in square brackets are optional parameters (-d, -l, -f, for example); vertical bars indicate that the terms on either side are mutually exclusive--you can use only one at a time.

For more information on the man command, see the man manual.

Previous Lesson: Changing File Permissions
Next Lesson: Changing Your Password

[ RETURN TO INDEX ]

Comments (most recent first)

Charles     (27 Aug 2010, 18:02)
I cannot believe how many students want you and me to do their homework for them. I covered all the information in 10 hours learn enough to teach beginning students.
mutua     (24 Aug 2010, 02:13)
nice notes
feroz khan     (14 Aug 2010, 14:47)
Hi bob,I saw the above comments from different people and found that,You have got the easiest way to explain the commands, I am new to linux and try to learn myself before joining any institute,
Linux Tutorial with commands
Linux Basics with commands
Linux Files
I need linux tutorials with basic commands so that I can have good command over linux as I am making it as My career.
gabe     (05 Aug 2010, 22:45)
what is the number next to the command? what does it mean?
gabe     (05 Aug 2010, 22:43)
i did the excercise but with ubuntu 10 i got than few lines of listing

~$ man -k password
chage (1) - change user password expiry information
chgpasswd (8) - update group passwords in batch mode
chpasswd (8) - update passwords in batch mode
cpgr (8) - copy with locking the given file to the password or gr...
cppw (8) - copy with locking the given file to the password or gr...
crypt (3) - password and data encryption
crypt_r (3) - password and data encryption
endpwent (3) - get password file entry
endspent (3) - get shadow password file entry
expiry (1) - check and enforce password expiration policy
fgetpwent (3) - get password file entry
fgetspent (3) - get shadow password file entry
fgetspent_r (3) - get shadow password file entry
getpass (3) - get a password
getpw (3) - Re-construct password line entry
getpwent (3) - get password file entry
getpwnam (3) - get password file entry
getpwnam_r (3) - get password file entry
getpwuid (3) - get password file entry
getpwuid_r (3) - get password file entry
getspent (3) - get shadow password file entry
getspent_r (3) - get shadow password file entry
getspnam (3) - get shadow password file entry
getspnam_r (3) - get shadow password file entry
gnome-keyring-daemon (1) - keep password and other secrets for users
Gnome2::PasswordDialog (3pm) - wrapper for GnomePasswordDialog
grpconv (8) - convert to and from shadow passwords and groups
grpunconv (8) - convert to and from shadow passwords and groups
lckpwdf (3) - get shadow password file entry
login.defs (5) - shadow password suite configuration
lppasswd (1) - add, change, or delete digest passwords.
pam_pwhistory (8) - PAM module to remember last passwords
pam_unix (8) - Module for traditional password authentication
passwd (1) - change user password
passwd (1ssl) - compute password hashes
passwd (5) - the password file
passwd2des (3) - RFS password encryption
putpwent (3) - write a password file entry
putspent (3) - get shadow password file entry
pwck (8) - verify integrity of password files
pwconv (8) - convert to and from shadow passwords and groups
pwunconv (8) - convert to and from shadow passwords and groups
setpwent (3) - get password file entry
setspent (3) - get shadow password file entry
sgetspent (3) - get shadow password file entry
sgetspent_r (3) - get shadow password file entry
shadow (5) - shadowed password file
shadowconfig (8) - toggle shadow passwords on and off
smbpasswd (5) - The Samba encrypted password file
smbpasswd (8) - change a user's SMB password
su-to-root (1) - A simple script to give an `interactive' front-end to ...
ulckpwdf (3) - get shadow password file entry
unix_chkpwd (8) - Helper binary that verifies the password of the curren...
unix_update (8) - Helper binary that updates the password of a given user
vigr (8) - edit the password, group, shadow-password or shadow-gr...
vipw (8) - edit the password, group, shadow-password or shadow-gr...
xcrypt (3) - RFS password encryption
xdecrypt (3) - RFS password encryption
xencrypt (3) - RFS password encryption
gub     (28 Jul 2010, 03:35)
great tips, thanks for info
takdog     (19 Jun 2010, 15:39)
hey bob,thankyou so much for the easiest linux tuts i can find on net.btw i'm watching teh world cup at the moment you know from south africa...and it seems to me that many of the comments here are originating from africans ,love yer replys....hilarious.thanks again from tasmania.
Bob Rankin     (28 May 2010, 13:17)
@sukhpreet - Sounds like a good place to start... why not?
sukhpreet     (28 May 2010, 10:01)
hi bob , i saw the above comments from difrent people and found that, u have got the easiest way to explain the commands, i am new to linux and try to learn myself before joining any institure,
so i can see on this page on left hand side, some topics that
Linux Tutorial
Linux Basics
Linux Files

so what do u suggest , should i start reading that topics to get good command overlinux
amit mathuriya     (27 May 2010, 04:40)
hi ..... this site very nice site and very easy site I always use this site.
hpal     (20 May 2010, 22:18)
Great Linux tip!
vishal kandharkar     (19 May 2010, 01:09)
its reallly help full for the beginners..........
Bob Rankin     (04 May 2010, 07:08)
Ooooh, and I need an oil change for my truck! Can we swap?
edgar     (03 May 2010, 03:58)
i need linux tutorials

thanks in advance
Bob Rankin     (23 Apr 2010, 07:09)
It's the TAB character.
Ben Bocalt     (22 Apr 2010, 22:16)
What does \t do in a BASH script?
Such as:
echo -e "$NAME\t$ADDRESS\t$PHONE" >> database
Debi     (13 Apr 2010, 13:54)
Know this should be a very easy answer, but cannot find the answer anywhere online. Sometimes when I run a command (not gedit or vi) the command prompt doesn't come back up. I have tried everything I can think of to get it back (quit, exit, esc, etc.). I end up shutting down and starting over, but that is a huge waste of time. Help!! Thanks!!
Henok Ephrem     (27 Mar 2010, 04:12)
still this operating system is not user friendly so please try to user friendly but the rest functionality is is best
Bob Rankin     (26 Mar 2010, 11:58)
@mauqista - I'll do your homework, but I charge a hefty hourly rate for that... :-)
mauqista williams     (26 Mar 2010, 09:15)
Create a text file that contains what is your absolute path, relative path and call it paths.txt

I'm new to Linux and I need help with this.
Kurt     (22 Mar 2010, 22:16)
To exit man use either q or CTRL-z
sri     (13 Mar 2010, 13:33)
i really liked the way you taught linux...i found it useful for a learner...
Bob Rankin     (03 Mar 2010, 08:33)
Are you posting a homework question here??? If so, it would have been easier to do a Google search for "TCP Port 22".
adah     (02 Mar 2010, 21:10)
your server log file shows repeated connections to TCP port 22. what is service is being accessed?
anurag nath     (21 Feb 2010, 02:41)
IT's a very good site for learning linux the fast and easy way !!! Bravo !!
Bob Rankin     (05 Feb 2010, 06:14)
@codjoe - Your wish is granted! Please begin reading the lessons on this site.

@kalai - Your question is too general. There are dozens of commands to read files from disk, depending on what you want to do with the data. See the Linux Commands section in the navbar here.
kalai     (05 Feb 2010, 04:53)
hi,how i ll retrive the file from hardisk and memory in linux,which command ll be use.plz help me
codjoe benjamin     (05 Feb 2010, 00:26)
hi, i will be much pleased if you could send me a beginners lesson on linux. i dont have any idea about it.
Ajeet kumar     (21 Jan 2010, 22:39)
Its really nice commands.......

*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text:
 

Ask Bob Rankin - Free Tech Support
<Send This Link to a Friend>         <Bookmark This Page>


Copyright © by Bob Rankin
All rights reserved - Redistribution is allowed only with permission.