Basics Commands of Linux with examples

Introduction
A feature of the Linux operating system is the command. By running commands, you can complete all simple and complex activities. The Linux terminal is used to run the commands. Similar to the command prompt in the Windows OS, the terminal is a command-line interface for interacting with the system. Linux commands are case-sensitive.
Compared to other operating systems like Windows and MacOS, Linux has a robust command-line interface. Through its terminal, we can perform both fundamental and sophisticated tasks. We can perform some simple operations like adding, removing, and moving files. Additionally, we are capable of performing complex jobs including networking chores, administrative tasks (such as package installation and user administration), and (ssh connections).
Linux terminal offers a variety of assistance features, making it a user-friendly terminal. Press “CTRL + ALT + T” keys together to open the Linux terminal, and then press the “ENTER” key to run a command.
Linux Commands with Diagrams:
-
pwd
pwd is used to show the location of the current working directory.

2. mkdir
mkdir is used to create the new working directory.
3.rmdir
rmdir is used to delete the directory.
4. ls
ls is used to show the list content of the directory.
5. cd
cd is used to change the working directory.
6. cd ~
cd ~ is used to move to the previous directory.
7. touch
touch is used to create empty files.
8. cat
cat command is used to write content in the file and display the content.
cat command is also used to view the content of the file as well as to display the content.
9. rm
rm command is used to remove the file.
10. cp
cp command is used to copy a file or directory.
11. mv
mv is used to move files or directories from one location to another.
12. head
head command is used to display the content of the file and the first 10 lines of the content.
13. tail
tail displays the last ten lines of the content of the file.
14. tac
tac works in a reverse way and shows the content in reverse order.
15. comm
comm is used to compare the files.
16. wc
wc is used to count the words, characters, and lines in the file.
17. od
od command is used to display the file content in different formats like octal, decimal, and hexadecimal.
18. gzip
gzip is used for reducing the file zip and compressing it.
19. gunzip
gunzip is used to decompress the file.
These all are the necessary Linux commands to operate the Linux and ubuntu.
One Comment