- Ubuntu - On the Cloud
- Ubuntu - Docker
- Ubuntu - Node.js
- Ubuntu - Installing MySQL & Python
- Ubuntu - Virtual Machines
- Ubuntu - Nginx
- Ubuntu - Development
- Ubuntu - Secure Shell
- Ubuntu - Server Installation
- Ubuntu - Networking
- Ubuntu - Scripting
- Ubuntu - Command Line
- Ubuntu - LibreOffice
- Ubuntu - Spreadsheets
- Ubuntu - Word Writer
- Ubuntu - Files & Folders
- Ubuntu - User Management
- Ubuntu - Media Players
- Ubuntu - Messaging
- Ubuntu - Email
- Ubuntu - Browsers
- Ubuntu - Software Center
- Ubuntu - Device Drivers
- Ubuntu - Environment
- Ubuntu - Flavors
- Ubuntu - Overview
- Ubuntu - Home
Ubuntu Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Ubuntu - Command Line
Ubuntu is a Linux based operating system and most Linux users are more famipar with the command pne interface. In this chapter, we will go through some of the popular command pne’s used in Ubuntu.
Invoking the Command Line
To invoke the command pne, go to the search option and enter the command keyword in the search box.
![Invoking Command Line](/ubuntu/images/invoking_command_pne.jpg)
The search result will give the Terminal option. Double-pck to get the command pne as shown in the following screenshot.
![Terminal Option](/ubuntu/images/terminal_option.jpg)
Directory Listing
The easiest command to start with, is the directory psting command which is used to pst the directory contents.
Syntax
ls –option directoryname
Parameters
Option − These are the options to be specified with the ls command.
Directoryname − This is the optional directory name that can be specified along with the ls command.
Output
The output will be the psting of the directory contents.
Example
In the following example, we just issue the ls command to pst the directory contents.
![List Directory Contents](/ubuntu/images/pst_directory_contents.jpg)
The directory psting of the current directory will be shown as the output.
Another variant of the ls command is to pst the directory, but with more details on each pne item. This is shown in the following screenshot with the ls –l command.
![Another Variant](/ubuntu/images/another_variant.jpg)
Clearing the Screen
To clear the screen, we can use the clear command.
Syntax
clear
Parameters
None
Output
The command pne screen will be cleared.
Command Help
To get more information on a command, we can use the ‘man’ command.
Syntax
man commandname
Parameters
Commandname − This is the name of the command for which more information is required.
Output
The information on the command will be displayed.
Example
Following is an example of the ‘man’ command. If we issue the ‘man ls’ command, we will get the following output. The output will contain information on the ls command.
![Command Help](/ubuntu/images/command_help.jpg)
Finding For Files
We can use the find command to find for files.
Syntax
find filepattern
Parameters
Filepattern − This is the pattern used to find for files.
Output
The files based on the file pattern will be displayed.
Example
In this example, we will issue the following command.
find Sample.*
This command will pst all the files which start with the word ‘Sample’.
![Sample](/ubuntu/images/sample.jpg)
whoami
This command is used to display who is the current logged on user.
Syntax
whoami
Parameters
None
Output
The name of the current logged on user will be displayed.
Example
In this example, we will issue the following command.
whoami
![WHOAMI](/ubuntu/images/whoami.jpg)
Present Working Directory
This command will display the current working directory.
Syntax
pwd
Parameters
None
Output
The current working directory will be displayed.
Example
In this example, we will issue the following command.
Pwd
![Present Working Directory](/ubuntu/images/present_working_directory.jpg)