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

2014 02 26 - 20 58 02 - Basic Linux Commands Text

The document provides a list of basic but essential Linux commands including ls to list directory contents, cd to change directories, pwd to show the present working directory, cat to display file contents, echo to display arguments, man to view command manuals, and exit, logout, or Ctrl-d to logout of a session. It also includes clear to clear the screen. An example is given of Bob using commands like ls, cd, pwd, cat, echo, and man in a sample session.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

2014 02 26 - 20 58 02 - Basic Linux Commands Text

The document provides a list of basic but essential Linux commands including ls to list directory contents, cd to change directories, pwd to show the present working directory, cat to display file contents, echo to display arguments, man to view command manuals, and exit, logout, or Ctrl-d to logout of a session. It also includes clear to clear the screen. An example is given of Bob using commands like ls, cd, pwd, cat, echo, and man in a sample session.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Basic Linux Commands

Here is a short list of basic, but essential commands. In Linux, commands are case-sensitive and
more often than not they are entirely in lowercase. Items that are surrounded by brackets ( [] ) are
optional. You will more than likely use at least some of these commands every time you log into a
Linux system. Become familiar with these commands because they can get you pretty far in a
short amount of time.
ls

- Lists directory contents. You will use ls to display information about files and directories.

cd [dir] - Changes the current directory to dir . If you execute cd without specifying a directory,
cd changes the current directory to your home directory. This is how you navigate around the

system.
pwd
pwd

- Displays the present working directory name. If you don't know what directory you are in,
will tell you.

cat [file]

- Concatenates and displays files. This is the command you run to view the contents

of a file.
echo [argument]

- Displays arguments to the screen.

- Displays the online manual for command . Type q to quit viewing the manual page.
The documentation provided by the man command is commonly called "man pages."
man command

exit , logout , or Ctrl-d


clear

- Exits the shell or your current session.

- Clears the screen.

Here is a screen capture of Bob's session using the above commands.


$ ls
PerformanceReviews sales-lecture.mp3 sales.data tpsreports
$ cd tpsreports
$ pwd
/home/bob/tpsreports
$ ls -l
total 2
-rw-r--r-- 1 bob users 31 Sep 28 14:49 coversheet.doc
-rw-r--r-- 1 bob users 35 Sep 27 08:47 sales-report.txt
$ cat sales-report.txt
We sold lots of widgets this week!
$ echo $PATH
/bin:/usr/bin:/usr/sbin:/usr/local/bin
$ man ls
NAME
ls - list directory contents
...

More details on how you can fully exploit the power of these simple commands will be covered
later.
http://www.LinuxTrainingAcademy.com

You might also like