Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
No Result
View All Result
Home Commands

Basic Linux Commands for Beginners

admin by admin
July 24, 2022
Reading Time: 4 mins read
0
Basic Linux Commands

In this article, we are going to learn some basic Linux commands. Which is most important to understand. And if you want to learn Linux you have to know about these Linux commands. All commands are used in any Linux distribution. The Linux command line is a text interface to your computer. Often referred to as the shell, terminal, console, prompt, or various other names, it can give the appearance of being complex and confusing to use.

Contents hide
1 Basic Linux Commands
1.1 whoami Command
1.2 pwd Command
1.3 cd Command
1.4 ls Command
1.5 cat Command
1.6 cp Command
1.7 mv Command
1.8 mkdir Command
1.9 rmdir Command
1.10 rm Command
1.11 sudo command
2 Conclusion

Basic Linux Commands

So first of all you have to open your favorite terminal in Linux. It depends on the distribution that you are using, you can simply find the terminal in the utility section. I am using Ubuntu so you have to click on Activities and just search Terminal.

Basic Linux Commands

Here is a list of basic Linux commands:

whoami Command

The whoami command print the user name who is currently logged in. The whoami command prints the name of the user associated with the current effective user ID. The syntax for whoami command:

$ whoami

Basic Linux Command

pwd Command

The pwd command is also known as the print working directory. This command shows the current working directory where you are in. This command shows you the full path of your current directory. The syntax for pwd command:

$ pwd

Basic Linux Commands

cd Command

The cd command is also known as change directory. Using this command you can change the directory and go to any directory using this command. It requires the full path of the directory, depends on your current working directory. This command is to enter you in any directory and also exit from it. The syntax for the cd command:

$ cd [path]

Basic Linux Commands

ls Command

The ls command is used to view the content of the directory. By default, this command displays the current directory content. But if you want to see the content from other directories then you have to enter the path of the directory with the ls command.

There are variations you can use with the ls command:

  • ls -R will list all the files in the sub-directories as well
  • ls -a will show the hidden files
  • ls -al will list the files and directories with detailed information like the permissions, size, owner, etc.
$ ls [OPTION]... [FILE]

Basic Linux Commands

cat Command

The cat command is one of the most important commands in the Linux operating system. The cat command is using to create a single file or multiple files, view the content of the file, concatenate files and redirect output in terminal or files.

The cat command is used for:

  • Display text file on screen
  • Read text file
  • Create a new text file
  • File concatenation
  • Modifying file
  • Combining text files

Basic Linux Commands

cp Command

The cp command is used to copy the file from one directory to another directory. The syntax for cp command:

$ cp [source] [destination]

Basic Linux Commands

mv Command

The mv command is used to move the file from one directory to another directory. But it is also used for renaming, yes if you want to rename the file or directory then you have to use the mv command for it. The syntax for the mv command:

$ mv [source] [destination]

To rename the files in Linux. The syntax for (rename the files) mv command:

$ mv [old name] [new name]

Basic Linux Commands

mkdir Command

The mkdir (Make Directory)command is to be used for making a new directory. If you want to create multiple directories in single command then you have to use the p (parents) option with the mkdir command.

$ mkdir [OPTION]... DIRECTORY

Basic Linux Commands

rmdir Command

If you need to delete a directory, use the rmdir command. However, rmdir only allows you to delete empty directories.

$ rmdir [OPTION]... DIRECTORY

Basic Linux Commands

rm Command

The rm (remove) command is used to remove or delete the directories with their contents.

$ rm [OPTION]... [FILE]

Basic Linux Commands

Note: Always be very careful with this command this will delete everything and there is no undo. So always be careful with this command before using.

sudo command

The sudo command is known as Super User, this command gives you administrative or root permissions.

$ sudo [execute the command]

Basic Linux Commands

Conclusion

Basic Linux commands help you to execute the task easily and fast. You have done some practice on these commands so you can easily execute all these commands. So all these commands are necessary for Linux beginners who want to learn Linux. There is a lot of commands which is necessary, but you can easily use Linux if you know these command which is mentioned in the article. GOOD LUCK!

 

ShareTweetSendShareShare
Previous Post

How to reset Kali Linux User password

Next Post

ls Command in Linux

admin

admin

Linuxips is a Linux blog that publishes articles and tutorials about server operations, installations, new techniques and Linux security.

Related Posts

Install ZSH on Arch Linux
Arch Linux

How to Install ZSH on Arch Linux

January 6, 2024
How To Use AppImage in Linux
Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu
Linux

How To Install uGet Download Manager On Ubuntu

March 8, 2023
Linux Files and Directories
Linux

Linux Files and Directories

March 3, 2023
How to Create Files With Passwords in Linux
Linux

How to Create Files With Passwords in Linux

February 27, 2023
pwd Command in Linux
Commands

pwd command in Linux

November 6, 2022

Leave a Reply Cancel reply

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

No Result
View All Result

You might also like

Install ZSH on Arch Linux

How to Install ZSH on Arch Linux

January 6, 2024
How to Install ZSH on Kali Linux 2024.1

How to Install ZSH on Kali Linux

January 5, 2024
How To Use AppImage in Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu

How To Install uGet Download Manager On Ubuntu

March 8, 2023
How to Install ZSH on Ubuntu 22.10

How to Install ZSH on Ubuntu 22.10

March 7, 2023
Linux Files and Directories

Linux Files and Directories

March 3, 2023

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.

  • Home
  • Web Stories
  • Privacy Policy
  • Contact Us
  • Disclaimer
No Result
View All Result
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.