Lecture 03 – BASIC LINUX COMMANDS

BASIC LINUX COMMANDS

BASIC LINUX COMMANDS: These are the Common Linux Operations

hands-on_image

mkdir (Make Directory)

We’re gonna need some directories to store all these files we’ve been working on. 

The mkdir command (Make Directory) is useful for that, it will create a directory if it doesn’t already exist. You can even make multiple directories at the same time.

COPY & RUN –> $ the below commands

				
					mkdir sample folder
				
			

cd (Change Directory)

cd (Change Directory) command is one of the most important and most widely used as system administrators. For admins on a headless server, ‘cd’ is the only way to navigate to a directory to check log, execute a program/application/script and for every other task.

COPY & RUN –> $ the below commands

				
					cd sample
				
			

Touch

Touch  Let’s learn how to make some files. A very simple way is to use the touch command. 

Touch allows you to the create new empty files.

COPY & RUN –> $ the below commands

				
					touch code1.txt
				
			

Mv (Move)

mv (Move) Used for moving files and also renaming them. Quite similar to the cp command in terms of flags and functionality.
 
COPY & RUN –> $ the below commands
				
					mv code1.txt /home/ubuntu/folder
				
			

 cp (Copy) Let’s start making some copies of these files. Much like copy and pasting files in other operating systems, the shell gives us an even simpler way of doing that.

COPY & RUN –> $ the below commands
				
					cp code2.txt ./sample
				
			

rm (Delete)

rm (Remove) Now I think we have too many files, let’s remove some files. To remove files you can use the rm command. 
The rm (remove) command is used to delete files and directories.
 
COPY & RUN –> $ the below commands
				
					rm code2.txt
				
			

Super User Do

super user do Sudo stands for either “substitute user do” or “super user do” and it allows you to elevate your current user account to have root privileges temporarily.

COPY & RUN –> $ the below commands

				
					sudo su
				
			

Installing Software

Install command is used to copy files and set attributes. It is used to copy files to a destination of the user’s choice, If the user want to download and install a ready to use package on GNU/Linux system then he should use apt-get, apt, yum, etc depending on their distribution.

COPY & RUN –> $ the below commands

				
					sudo apt-get update
				
			

Linux commands and tasks