DEV Community

Cover image for 7 Fun and Essential Linux Commands for New Comers
Abdur Rehman Khalid
Abdur Rehman Khalid

Posted on

7 Fun and Essential Linux Commands for New Comers

If you are new to Linux operating systems and does not know much commands and terminal functionality, so this article can provide some good commands that you can use without any hesitation and tension of doing anything wrong.

So Let's Start!

1. Checking the Current Directory

If you are new to any of the Linux operating system and you don't know in which folder or which directory you are then this command is very useful, as you will get to know that where you are.

Open terminal and write:
pwd
Check Current Working Directory

2. Checking the History of Terminal

This command is useful when you are new to Linux and forgetting the often used commands, you can type this command in terminal to know the history of all commands that have been typed in the terminal.

Open terminal and write:
history
Terminal History

3. Installing the Neofetch

You often have seen a Linux Terminal with a kind of logo of Linux Distro and other related figures, this can be achieved with the Help of Neofetch. But first you have to Install it using the following command in the terminal:
sudo apt-get install neofetch
Install Neofetch

After Installing Neofetch simply run neofetch in the terminal and you will get following kind of result in terminal according to your Operating System:
Neofetch Resuly

4. Listing Contents of a Directory

Now there are two types of this command but it first we will talk about the simple stuff, open the terminal and write:
ls
This command will show all those contents that does not require specific administration permissions or files that are not hidden as following:
Directory
By typing:
ls -al
you will be able to see everything, along with hidden files, folders and directories along side with all permissions, whether you can edit, read or run those files.
Listing with Admin

5. Listing All Services

In order to list all services installed on your system you can type the following command to get yourself familiarized with services that are running or present in your system.
Open the terminal and type:
systmctl list-unit-files
List All Services

6. Disk Storage Checker

This simple commands let you know all the basic stats about your disk storage and other facts that can be used by system administrations for further work.
Open the terminal and type:
df
Disk Storage

7. Creating, Editing and Saving the File

In order to create a new file, first you have to type the touch file_name.txt command in the terminal as following:
Make a New File
Now we have to open this file in editor to write and edit the file, in order to open the file in the editor we have to write nano file_name.txt into terminal and now you are free to write anything in the file and for saving the file press CTRL + O and in order to exit the editor press CTRL + X.
Editing the File

For time being these 7 commands are enough when you get used to some basic commands then you can move forward learning more and more productive commands for personal and professional work as well.

Have a Nice Day Ahead :)

Top comments (1)

Collapse
 
mudassirijaz9 profile image
Mudassir Ijaz

really helpful, want more commands about linux.