38 Simple Linux commands for beginners

Simple Linux commands for beginners. When hearing about Linux , most people think about a complicated operating system.

Linux is an entire family of open-source Unix operating systems, that are based on the Linux Kernel. This includes all of the most popular Linux based systems like Ubuntu, Fedora, Mint, Debian, and others. 

It’s recommended to use a command-line interface (CLI) because it’s more powerful and effective. 

Linux commands for beginners

What is Linux ?

The kernel of an operating system is Linux. UNIX is a computer operating system that you might have heard about.

Linux, after all, is a UNIX clone. Linus Torvalds, on the other hand, built it entirely from scratch. Linux is free and open-source, which ensures that you can modify it.

There are a variety of Linux distributions to choose from :

Ubuntu Linux

Ubuntu is a complete Linux operating system. This download is distributed and has both group and technological assistance.

The Ubuntu project is based upon the Ubuntu Manifestos principles of free software.

  1. Ubuntu is still free of charge, except with the Enterprise Version there is no extra charge.
  2. Ubuntu provides the earlier version of the Free Software community’s translation and compatibility facilities.
  3. Every six months, a new version is available. Ubuntu is releases with daily and regular update cycles.
  4. Ubuntu is entirely committed to the principles of open source software development.
Red Hat Enterprise Linux

Red Hat Enterprise Linux is the world’s leading enterprise Linux platform. It’s an open source operating system (OS).

It’s the foundation from which you can scale existing apps—and roll out emerging technologies—across bare-metal, virtual, container, and all types of cloud environments.

Red Hat Enterprise Linux is a Linux distribution made by Red Hat for the commercial market.

The first version of Red Hat Enterprise Linux to bear the name originally came onto the market as “Red Hat Linux Advanced Server”.

Linux Mint

Linux Mint is an Ubuntu similarly Linux distribution. That features a wide range of free, open-source applications.

For those that want to use proprietary features such as multimedia codecs. It may include complete out-of-the-box multimedia support.

Linux Mint relies heavily on free and open-source applications.

Version 18’s installer no longer featured any proprietary software. Since version 18.1, the software also provided the option to use third-party and proprietary programs.

Linux Mint includes a variety of applications, including LibreOffice, Firefox, Thunderbird, Hex Chat, Pidgin, Transmission, and the VLC media player.

Debian

Debian is an open source release for Ian Murdock’s project. The Debian Community service project was released on August 16, 1993. Debian GNU/Linux is another name for Debian.

Debian’s first stable update (1.1) was on June 17, 1996, and its first update (0.01) was on September 15, 1993. The most common version for personal computers and servers is Debian Stable.

Debian also serves as the foundation for several other distributions, most notably Ubuntu.

Debian is one of the first operating systems to be built on the Linux kernel.

A team of volunteers led by the Debian Project Leader and three foundational documents. The Debian Social Contract, the Debian Constitution, and the Debian Free Software Rules manage the project over the Internet.

New distributions are constantly modified, and the next contender is launched after a time-based freeze.

Fedora

Fedora is a Fedora Project Linux distribution. Red Hat, an IBM subsidiary, is mainly supporting this, though other companies provide extra funding.

This includes applications licensed under a variety of proprietary and open-source licenses.

This is the commercial Red Hat Enterprise Linux distribution’s upstream root, and CentOS followed suit.

With the introduction of Fedora 30, there have been five editions available:

Workstation for personal computers, Server for clients, CoreOS for cloud computing, Silverblue for an immutable workspace specialized to container-based workflows, and IoT for IoT applications.

Simple Linux commands for beginners :

Here is a list of Linux commands for beginners :

  • Open Terminal n Ubuntu press CTRL+ALT+T or ALT+F2

Simple Linux Commands for beginners :

1. ls command

The ls commands is use to view the contents of directory. By default , this command will display content of your current working directory.

If you want to see content of other directory , type command ls than directory path.

  • ls -R will list all the files in the sub-directories as well
  • To show the hidden files use ls -a  command
  • ls -al will list the files and directories with detailed information.

2. cd command

This is another one of the best Linux commands for beginners .

The cd command is used to navigate through the Linux files and directories.

For example , you’re in /home/username/Downloads and you want to go to documents, a subdirectory of Downloads. To do so, simply type the following command: cd Documents.

There are some shortcuts to help you navigate quickly:

  • cd .. (with two dots) to move one directory up
  • cd to go straight to the home folder
  • to move to your previous directory use cd- command.


3. grep command

It is used to find text in a File. It lets you search through all the text in a given file.

For example , grep root kali.txt will search for the word root in the kali file. Lines that contain the searched word will be displayed fully.


4. su /sudo command

This command enables you to perform tasks that require administrative or root permissions.

With this command changes the shell as use for super(root) user. It is not recommended to always use because it might be easy for an error to occur if you did something wrong.


5. pwd command

This command allows you to find path of current working directory. This command will return full path of current working directory.


6. passwd command

It looks similar to the pwd command the role it plays is different.

This command is used to change the user account password. You could change your password or the password of other users. 

passwd [username] – changes the password for the user.


7. mv command

To move a file or rename a file you would use the mv command.

$ mv first.txt second.txt

8. cp command

Used to copy source file destination file. In case you need a copy of the file second.txt in the same directory you have to use the cp command.

$ cp second.txt third.txt


9. rm command

This command is used to remove files in a directory or the directory itself. A directory cannot be removed if it is not empty.

rm [name of the file]


10. mkdir/rmdir command

mkdir [directory name] is used to create a directory.

$ mkdir directory

If you need to delete a directory, use the rmdir command.

$ rmdir directory


11. chmod command

chmod is another Simple Linux commands for beginners. It used to change the read, write, and execute permissions of files and directories. 

For example :

$ chmod 755 file
Octal NotationPermissionSymbolic Representation
0No Permission
1Execute Permission Only–x
2Write Permission Only-w-
3Write and Execute Permissions (1+2)=3-wx
4Read Permission Onlyr–
5Read and Execute Permissions (1+4)=5r-x
6Read and Write Permissions (2+4)=6rw-
7Read, Write and Execute Permissions, Means Full Permissions (1+2+4)=7rwx
Source : https://hackr.io/


12. chown command

This command is used to change the ownership of a file/folder or even multiple files/folders for a specified user/group.

chown owner-name file-name


13. cat command

It is used to list the contents of a file on the standard output. To run this command, type cat followed by the file’s name and its extension.

$ cat file.txt
$ cat file1.txt file2.txt


14. echo command

This command is used to display a text or a string to the standard output or a file.

or example, if you want to add the text, “Hello World” into a file called name.txt, you would type echo Hello world >> name.txt .


15. wc command

The wc command is used to find out the number of new lines, word count, byte and characters count in a file specified by the file arguments.

wc [options] filenames.

  • To prints the number of lines in a file use wc -l command.
  • To prints the number of words in a file use wc -w command.
  • For Displays the count of bytes in a file use wc -c  command.
  • wc -m : prints the count of characters from a file.
  • wc -L : prints only the length of the longest line in a file.


16. man command

This command is used to view the on-line reference manual pages for commands/programs. You can easily learn how to use certain Linux commands right from Linux’s shell by using the man command. 

$ man grep
$ man mkdir

17. history command

Running history command is particularly useful if you want to review the commands you’ve entered before.


18. clear command

Use the clear command to clean out the terminal if it is getting cluttered with too many past commands.

$ clear


19. apt –get command

apt -get is a powerful and free front-end package manager for Debian/Ubuntu systems. It is use to install new software packages, remove available software packages, upgrade existing software packages as well as upgrade the entire operating system. 

$ sudo apt-get update


20. reboot command

It is used to reboot system.

$ reboot


21. touch command

The touch command allows you to create a blank new file through the Linux command line.

$ touch file.txt


22. locate command

You can use this command to locate a file. You can search for a file even if you don’t remember its exact name.

To search for a file that contains two or more words, use an asterisk (*). For example, locate -i school*note command will search for any file that contains the word “school” and “note”, whether it is uppercase or lowercase.


23. find command

Similar to the locate command, using find also searches for files and directories. The difference is, you use the find command to locate files within a given directory.

  • To find files in the current directory use, find . -name notes.txt
  • To look for directories use, / -type d -name notes. txt


24. df command

Use df command to get a report on the system’s disk space usage, shown in percentage and KBs. If you want to see the report in megabytes, type df -m.


25. du command

It is used to check how much space a file or a directory takes. However, the disk usage summary will show disk block numbers instead of the usual size format.


26. head command

The head command is use to view the first lines of any text file. By default, it will show the first ten lines, but you can change this number to your liking.


27. tail command

 The tail command will display the last ten lines of a text file. For example, tail -n filename.ext.


28. diff command

The diff command compares the contents of two files line by line.

For example ,  diff file1.txt file2.txt


29. tar command

The tar command is the most used command to archive multiple files into a tarball — a common Linux file format that is similar to zip format, with compression being optional.


30. jobs command

jobs command will display all current jobs along with their statuses. A job is basically a process that started by the shell.


32. ping command

Use the ping command to check your connectivity status to a server. For example, by simply entering ping google.com, the command will check whether you’re able to connect to Google and also measure the response time.


33. wget command

The Linux command line is super useful — you can even download files from the internet with the help of the wget command. To do so, simply type wget followed by the download link.

34. uname command

The uname command, short for Unix Name, will print detailed information about your Linux system like the machine name, operating system, kernel, and so on.


35. top command

The top command will display a list of running processes and how much CPU each process uses. 


36. zip/unzip command

Use the zip command to compress your files into a zip archive, and use the unzip command to extract the zipped files from a zip archive.


37. hostname command

If you want to know the name of your host/network simply type hostname. Adding a -i to the end will display the IP address of your network.


38. useradd/userdel command

useradd is used to create a new user, while passwd is adding a password to that user’s account. To add a new person named Yuvraj type, useradd Yuvraj and then to add his password type, passwd 123456789.

Remove a user is very similar to adding a new user. To delete the users account type, userdel User Name

Also Read :-

Thank you for visiting and reading this blog post simple Linux commands for beginners. Give your feedback and suggestions to help us.

We hope this post was helpful for you. Please share this post.

Keep visiting our website to get more helpful posts and updates.

FAQ

What are Simple Linux commands for beginners ?

10 simple Linux commands for beginners :-

  • ls
  • cd
  • chmod
  • chown
  • grep
  • wget
  • locate
  • history
  • rmdir/mkdir
  • cat

References :-

Summary
38 best simple Linux commands for beginners
Article Name
38 best simple Linux commands for beginners
Description
List of Simple Linux Commands for beginners. You can learn the most relevant commands for the Linux command line in this article. This includes all of the most popular Linux based systems like Ubuntu, Fedora, Mint, Debian, and others.
Author
yuvraj
Publisher Name
pcbloggers.com
Publisher Logo

Leave a Comment

  +  86  =  95

%d bloggers like this: