Linux Basic Commands | linux | terminal - CYBER THIEVE

 Linux basic commands

Linux is an open source operating system (OS). An operating system is the software that directly manages a system’s hardware and resources, like CPU, memory, and storage. The OS sits between applications and hardware and makes the connections between all of your software and the physical resources that do the work.
Linux was designed to be similar to UNIX, but has evolved to run on a wide variety of hardware from phones to supercomputers. Every Linux-based OS involves the Linux kernel—which manages hardware resources—and a set of software packages that make up the rest of the operating system. Organizations can also choose to run their Linux OS on a Linux server.

What's a command line?

The command line interface is a method to directly connect with kernel and ask to do the task and kernel commands the hardware to perform the users aked task. it all can be perform ussing a interface called shell or terminal.

What does Linux include?

Kernel

The base component of the OS. Without it, the OS doesn’t work. The kernel manages the system’s resources and communicates with the hardware. It’s responsible for memory, process, and file management.

System user space

The administrative layer for system-level tasks like configuration and software install. This includes the shell, or command line, daemons, processes that run in the background, and the desktop environment.

Applications

A type of software that lets you perform a task. Apps include everything from desktop tools and programming languages to multiuser business suites. Most Linux distributions offer a central database to search for and download additional apps.

what you will read -

File management commands
Directory management commands
General purpose utilities

File Management Commands :

ls : this command is used in Linux for listing all the files in working directory

  • it has many options but most used options are
-a = lists all the file and directories include hidden and non-hidden
-l = used for long listing (permission, create-date,size......)
-i =for checking the i-node of the file
-S= for sorting in decreasing order

cat : this command is used in Linux for show, create and modify a file.
syntax : to read a file which is already present in working directory
             cat file_name
for creating or modify a file:
cat >> file_name
 
note : - after you finish press ctrl + c
 
rm : this command is used for remove a file in working directory.
 
-r = it is used for recursively   (directory and there content if any sub dir or file it will apply on that too).
-f = forcefully 
-d = it remove empty directory
 
mv : this command is used for move a file.
 
syntax :
mv filename/sourcefile -with file name    destination_path (where you want to move the file )
 
          NOTE :- this command is also used for rename a file (mv file_name new_file_name)
 
 
cp : this command is used for copy a file.
 
syntax :
cp filename/source_file -with file name    destination_path (where you want to copy the file )
 
chmod
this command is used for alter the file permissions or change the file permissions(it can be a file or a directory)

syntax : 
 chmod + or - [rwx] file_name

+ : add permission
- : remove permission

cmp : this command compare two files bytes by bytes.

-b :print differ bytes

diff : this command compare files line by line.
-s : report when two files are same.
-q : report when two files are differ.


comm: compare two files line by line
-12 : print the same content of both files 
-3 : print only differ content of both files
 

Directory Management Command :

mkdir : this command is used in linux for creating directories.

syntax :

mkdir directory_name

rmdir : this is used for removing a directory.

syntax :

rmdir directory_name

 

cd : cd command is used for changing the directory in terminal.

syntax :

cd destination_path

NOTE :- (..) double dot is used for single time back

 

pwd
this command is used for printing the working directory full path it called present working directory
  
NOTE : If you find any mistake or weakness in my article please help us to improve our content.

Also Read Our Best Article on Networking :

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Ok, Go it!