Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

Basic Ubuntu Commands

Uploaded by

Irfan Sayyad
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Basic Ubuntu Commands

Uploaded by

Irfan Sayyad
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

basic Ubuntu Commands

What are the basic commands of Ubuntu


This section contains some basic commands of Ubuntu, so let
us start and discuss them one by one. Firstly, you must open
the terminal in Ubuntu; press “ctrl+alt+t” from your
keyboard to open the terminal.

Command 1: pwd
This command refers to the present working directory in
which you are operating; in simpler words, in which your
terminal is open. To check PWD, execute the pwd keyword in
your terminal and hit enter; the command of PWD is written
below along with the result of that command.

Keep some space for output

Command 2: dir
The dir command is used to print (on the terminal) all the
available directories in the present working directory:

Keep some space for output

Command 3: ls
This command is used to list down all the directories and files
inside the present working directory (or you can give the path
of a specific directory);

Keep some space for output


Command 4: cd
One of the most used commands of Ubuntu; you can change
the directories in the terminal using the “cd” command.

Keep some space for output

Command 5: touch
This Ubuntu command can be used to create a new file as well
one can use it to change the timestamp of any file; the
command given below will create a new text time in pwd:

Keep some space for output

Command 6: cat
This command is used to show the content of any file:

you can use this command to save the content of multiples


files to one file:

Keep some space for output

Command 7: mkdir
The above-mentioned command will make a directory in your
pwd; for example, the following command will make the
directory “new” in pwd.

Keep some space for output


Command 8: rm
This remove command is used to remove the specific file
from a directory.

you can remove the empty directory,

Keep some space for output

Command 9: cp
The cp command will help you to copy any file or folder to
any directory.

If you want to copy the complete folder, then.

Keep some space for output

Command 10: head


This command helps you to get the first ten lines of a text file;
for instance,

Keep some space for output

Command 11: tail


The tail command is used to get the last ten lines of the text
file.

Keep some space for output


Command 12: uname
You can use the command to get the release number, version
of Linux, and much more. The “-a” flag is used to get detailed
information.

Keep some space for output

Command 13: wget


You can use the wget command to download the content from
the internet.

Keep some space for output

Command 14: history


The history command shows the list of commands (with
numeric numbers) executed:

Keep some space for output

Command 15: zip or unzip


To convert your files to zip archive; you can get help by using
the “gzip” command; moreover, a zipped file can be unzipped
using the “gunzip” command:

Keep some space for output


Command 16:

 clear – clear screen


Keep some space for output

Command 17:

Time and Date commands


date – show current date and time
sleep – wait for a given number of seconds
uptime – find out how long the system has been up
Keep some space for output

Command 18:

Unix users’ commands


These commands allow you to get basic
information about Unix users in your environment.
 whoami – show your username
 id – print user identity
 groups – show which groups user belongs to
 passwd – change user password
 who – find out who is logged into the system
 last – show history of logins into the system
Keep some space for output

You might also like