10 Basic Linux Commands for Linux Newbies. PT-1

The Linux operating system has made a large impact on our day to day life from starting of Android to Windows 10 which has been shipped Windows Subsystem for Linux (WSL) in 2016. So today I will be showing you 10 Basic Linux commands for Linux new users.
A
s with every modern operating system evolve, the Linux filesystem sits at the core of its fundamental design and paves the way for you to visualize and manipulate your system hierarchy.Learning to navigate the Linux filesystem creatively will put you an edge over the average window users.
10 Basic Linux Commands for Linux Newbies to Get Started
- mkdir ( Make Directory).
You can use the mkdir command to create a new folder or subfolder. Just give your folder name after mkdir command in your terminal.
1 2 3 4 5 |
:~# mkdir FolderName eg: :~# mkdir kryptos |
You may also like: How to use Kali Linux to remove windows password ( 7,8,10)
2. touch
The touch command is a very essential Linux command for creating a valid empty file on the fly. You can create files on the go in your terminal and fill them up later or in real-time – based on your requirements.
1 2 3 4 5 |
:~# touch filename eg: :~# touch kryptostechnology.txt |
3. cd (Change Directory).
One of the main command which many Linux users will use is their terminal is the cd. It’s one of the most Linux basic commands. Just type the name of the folder you want to go in from your current directory. If you want to go back up just type cd with double dots (..).
1 2 3 |
:~# cd Desktop :~#/Desktop# |
4. cp (copy-and-paste)
To make duplicate copy file from your Linux terminal. you will need to do basic copy-and-paste using the cp command, you determine the file you want to copy and the destination location to paste that file.
1 2 3 4 5 |
:~# cp src des eg: :~# cp kryptosTechnology.txt /Desktop |
Note: If you’re copying files into the directory that requires root permission for any new file, then you’ll need to use sudo command.
You may Also Like: Hongmeng OS: Huawei’s New Android Replacement
5. ls ( List)
The ls command is probably one of the most widely used commands in the Unix world. It presents to you the contents of a particular directory – both files and directories.
1 |
:~# ls |
6. pwd
pwd stands for Print Work directory which does exactly what you think of. It shows the current directory the user is working in. This is one of the most handiest Linux terminal commands that aims to make sure new users know their location within the filing system of the cryptic terminal window.
1 2 3 |
:~# pwd /root/Desktop |
7. rm (remove)
Using the rm command will give you the ability to remove directory or files. You can use -f if the file need root permission to be removed. And also you can use -r to do recursive removal to remove your folder.
1 2 3 4 |
:~# rm myfile.txt eg :~# rm kryptostechnology.txt |
8. cat
As an L user, from time to time you may need to view text or code from your script, this where cat command would come in play. the cat command can also be used to scan a text file and to see if you have a specific keyword within the file.
1 2 3 4 5 |
9. tar (Compressing & extracting)
The tar command is very useful when a user wants to compress files and file fast and easy from their terminal. It’ll compress everything inside of an entire directory specified by the users, in other words, it works recursively.
- -c: Create an archive.
- -z: Compress the archive with gzip.
- -v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
- -f: Allows you to specify the filename of the archive.
1 2 3 |
tar -czvf name-of-archive.tar.gz /compress/to/directory-or-file eg: tar -czvf archive.tar.gz /usr/local/something |
Extract an Archive
Once you have an archive, you can extract it with the tar command. The following command will extract the contents of archive.tar.gz to the current directory.
1 |
tar -xzvf archive.tar.gz |
10. apt-get
The apt command is different base on which Linux distro you are using, this command will work in any Debian based Linux distribution, which can be used to install, remove and upgrade any package. The Advanced Packaging Tool (APT) is a very powerful command-line tool which can use to fix your system if the dependencies are broken, upgrade, update, installation and even removing the software from your system.
in other Linux distribution like Centos and Fedora, they use a different package manager command. Fedora used to have yum but now change to dnf.
1 2 3 4 5 |
:~# sudo apt-get update :~# sudo apt-get upgrade :~# sudo dnf update :~# sudo dnf upgrade |