🔒 Closed 10 Basic Ubuntu Commands That Every Linux Newbies Should Remember

Status
Not open for further replies.

winz001

Eternal Poster

So let's get started with the list of 10 Linux Basic commands -

1. sudo

This SuperUserDo is the most important command Linux newbies will use. Every single command that needs root's permission, need this sudo command. You can use sudo before each command that requires root permissions -

$ sudo su

2. ls (list)

Just like the other, you often want to see anything in your directory. With list command, the terminal will show you all the files and folders of the directory that you're working in. Let's say I'm in the /home folder and I want to see the directories & files in /home.

/home$ ls

ls in /home returns the following -

imad lost+found

3. cd

Changing directory (cd) is the main command that always be in use in terminal. It's one of the most Linux basic commands. Using this is easy. Just type the name of the folder you want to go in from your current directory. If you want to go up just do it by giving double dots (..) as the parameter.

Let's say I'm in /home directory and I want to move in usr directory which is always in the /home. Here is how I can use cd commands -

/home $ cd usr

/home/usr $

4. mkdir

Just changing directory is still incomplete. Sometimes you want to create a new folder or subfolder. You can use mkdir command to do that. Just give your folder name after mkdir command in your terminal.

~$ mkdir folderName

5. cp

copy-and-paste is the important task we need to do to organize our files. Using cp will help you to copy-and-paste the file from terminal. First, you determine the file you want to copy and type the destination location to paste the file.

$ cp src des

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.

6. rm

rm is a command to remove your file or even your directory. 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.

$ rm myfile.txt

7. apt-get

This command differs distro-by-distro. In Debian based Linux distributions, to install, remove and upgrade any package we've Advanced Packaging Tool (APT) package manager. The apt-get command will help you installing the software you need to run in your Linux. It is a powerful command-line tool which can perform installation, upgrade, and even removing your software.

In other distributions, such as Fedora, Centos there are different package managers. Fedora used to have yum but now it has dnf.

$ sudo apt-get update

$ sudo dnf update

8. grep

You need to find a file but you don't remember its exact location or the path. grep will help you to solve this problem. You can use the grep command to help finding the file based on given keywords. $ grep user /etc/passwd

9. cat

As a user, you often need to view some of text or code from your script. Again, one of the Linux basic commands is cat command. It will show you the text inside your file. $ cat CMakeLists.txt

10. poweroff

And the last one is poweroff. Sometimes you need to poweroff directly from your terminal. This command will do the task. Don't forget to add sudo at the beginning of the command since it needs root permission to execute poweroff.

$ sudo poweroff

hope this help you.
_________________________
 
Thank you for sharing this list of 10 basic Linux commands that every Linux newbie should remember. These commands are indeed very useful for working on the Linux terminal. Here is some additional information about these commands:

1. sudo: The sudo command allows users to execute commands with root privileges. It is a very powerful command and should be used with caution. It is recommended to only use sudo when necessary.

2. ls: The ls command is used to list the files and directories in a directory. It is a basic command that is used frequently.

3. cd: The cd command is used to change the current working directory. It is one of the most frequently used commands in Linux.

4. mkdir: The mkdir command is used to create a new directory. It is a basic command that is used frequently.

5. cp: The cp command is used to copy files and directories. It is a basic command that is used frequently.

6. rm: The rm command is used to remove files and directories. It is a powerful command and should be used with caution.

7. apt-get: The apt-get command is used to manage packages in Debian-based Linux distributions. It can be used to install, remove, and update packages.

8. grep: The grep command is used to search for patterns in files. It is a powerful command that can be used to search for specific text in files.

9. cat: The cat command is used to concatenate files and display the contents of files. It is a basic command that is used frequently.

10. poweroff: The poweroff command is used to shut down the system. It should be used with caution as it will shut down the system immediately without any warning.

Overall, these commands are very useful for working on the Linux terminal and are essential for any Linux newbie to learn.
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 632
    Views
  • 1
    Participants
Last reply from:
Unknown user

Trending Topics

Online now

Members online
1,319
Guests online
1,579
Total visitors
2,898

Forum statistics

Threads
2,315,098
Posts
29,181,103
Members
1,183,426
Latest member
sirbi17
Back
Top