We are open 7 days per week 6am-10pm
35 Linux Basic Commands Every User Should Know

31. echo command

This command is used to move some data into a file. For example, if you want to add the text, “Hello, my name is John” into a file called name.txt, you would type echo Hello, my name is John >> name.txt

32. 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.

33. 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.

34. useradd, userdel command

Since Linux is a multi-user system, this means more than one person can interact with the same system at the same time. 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 John type, useradd John and then to add his password type, passwd 123456789.

To remove a user is very similar to adding a new user. To delete the users account type, userdel UserName

Bonus Tips and Tricks

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

Try the TAB button to autofill what you are typing. For example, if you need to type Documents, begin to type a command (let’s go with cd Docu, then hit the TAB key) and the terminal will fill in the rest, showing you cd Documents.

Ctrl+C and Ctrl+Z are used to stop any command that is currently working. Ctrl+C will stop and terminate the command, while Ctrl+Z will simply pause the command.

If you accidental freeze your terminal by using Ctrl+S, simply undo this with the unfreeze Ctrl+Q.

Ctrl+A moves you to the beginning of the line while Ctrl+E moves you to the end.

You can run multiple commands in one single command by using the “;” to separate them. For example Command1; Command2; Command3. Or use && if you only want the next command to run when the first one is successful.

To Sum Up

Basic Linux commands help users execute tasks easily and effectively. It might take a while to remember some of the basic commands, but nothing is impossible with lots of practice.

In the end, knowing and mastering these basic Linux commands will be undoubtedly beneficial for you. Good luck!

source:hostinger

Add Comment

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