basic linux commands | basic unix commands

What is the command:~

The command is a directive to a computer program to perform a specific task. It may be issued via a command-line interface, In this articles, we learn most uses Linux command For Beginners. , , pdf, , list

Starting with our most useful first command

1. ls
See advanced uses ls command here

ls command is working listing the directory contents ls command shows how many file and directories in your current working directory

ls
Important Command Linux
2. pwd

PWD command shows our current working directory

pwd
Important Command Linux
3. cd

the cd command is work changing our current directory to another directory I change our current to Download Directory Type simple Command cd and ( our directory name )

cd Downloads/
4. mkdir

mkdir: create a new directory

mkdir directory
ls
5. rm

rm command work removing deleting files and directory type simple rm and our target filename

rm this_is_the_file.txt
ls
Important Command Linux
6. cp

cp copy file and directory Source to Destination I copy passwd file with cp command our Desktop directory

our source is /etc/passwd and destination is /root/Desktop

cp /etc/passwd /root/Desktop/
Important Command Linux
7. touch

touch command creating a file

ls
touch file.txt
8. mv

mv move/cut file and directory or rename a file and directory Source to Destination

our source is file.txt destination is hacknos.txt I rename the file file.txt to hacknos.txt

mv file.txt hacknos.txt
Important Command Linux

moving our file Desktop to /root/directory

mv ourfile.txt /root/directory

and ls command to see our file is moved

ls

see the file our root/Directory

ls /root/directory
Important Command Linux
9. locate

locate locating and finding system file and directory I locate an ssh config file sshd_config

locate sshd_config
10. cat

cat command to see any file text I show the sshd_config file text

Important Command Linux
11. man

man Display the manual file and software I am displaying the cp command user manual

man cp
Important Command Linux
12. chown

chown changing ownership file and directory, chown changes the user and/or group ownership of each given file

we see the ownership the file hacknos.py is root and root now I changing ownership to another user rahul

ls -l

After changing permission

chown rahul:rahul hacknos.py
ls -l
Important Command Linux
13. chmod

The chmod command changing file and directory permission read, write, executable Two type change file permission numeric and symbolic

Changing Permission Numeric
ls -l
chmod 666 hacknos.py
Important Command Linux
Changing Permission Symbolic

Adding permission read-write executable hacknos.py file

ls -l
chmow +rwx hacknos.py
Important Command Linux
14. nano

nano is a Command-Line Linux editor nano used to create a file and edit file add any text

I Creating a file hacknos.txt and input some line, for example, see in image file

nano hacknos.txt
Important Command Linux
15. top

The top command shows the system currently running task The top program provides a dynamic real-time view of a running system.

It can display system summary information as well as a list of processes or threads currently being managed by the Linux kernel.

top
Share On Linkedin

About Rahul Gehlaut

Cyber Security Researcher, CTF Player. Tech Blog Writer.

View all posts by Rahul Gehlaut →

Leave a Reply

Your email address will not be published. Required fields are marked *