Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Share Folders between Host and Guest OS in VirtualBox Virtualization
  • 10 Tips to Speed Up Slow Windows 10 PC How-To
  • How to Record Yourself Online Using a Webcam Cool Websites
  • Best rpn calculator 2020

    Best rpn calculator 2020. 1 - DM42 - The Most Precise Calculator. Top Reviews I'm a hot-rod enthusiast when it comes to

  • How to Create and Manage Discord Server How-To
  • How to Create PDF Documents in Microsoft Office Office Tips
  • Best Methods to Improve Your Typing Speed Computer Tips
  • Fix VMware Missing HBA Adapters Virtualization

7 Linux Commands Every Beginner Should Know

Posted on October 9, 2020 By blog_786 No Comments on 7 Linux Commands Every Beginner Should Know

If you’re new to Linux, using the terminal can be a little tedious. Newer Linux distros like Linux Mint have a great graphical interface, but the Linux kernel is the kernel, which means using the command line.

Even if you’re a Windows user, you’ve probably had to open a command prompt window at some point in your life to complete a task. On the latest version of Windows, Windows 10, you can even install the Ubuntu Bash shell on Windows and run Linux commands directly from Windows!

In this article, I’m going to go over some of the really basic Linux commands that are common to almost all Linux distributions. Since bash is the most popular shell I also use, I will use this syntax for all commands. Also, I will mention some of the more useful arguments for each command, but there are others that can be found in the man pages.

1.ls (contents of the list)

In my opinion, the first command you should know is the ls command. This command displays the contents of the current working directory. If you just type ls and hit Enter, you get a very simple list of files and folders in the current directory.

7 Linux Commands Every Beginner Should Know

Most Linux distributions will highlight directories in a different color, such as green. Files usually have a standard shell prompt color, which is gray in my case. Without any arguments, ls is boring. If you use -a with ls, you should be able to see all hidden files.

– /

7 Linux Commands Every Beginner Should Know

Anything that starts with a dot is a hidden file or directory. All hidden directories are dark blue which is difficult to see. Another useful argument is the -l option, as shown below.

7 Linux Commands Every Beginner Should Know

This gives you a long list of files and folders with much more information like permissions, links, user, group, size, and last modified date. If you don’t know how to interpret permissions, be sure to read my post on Linux permissions.

2. cd (change directory)

Once you can list the contents of a directory, it is helpful to know how to switch to a different directory. By default, when you open a bash shell, you always start your home directory. This is indicated by the tilde character (~) at a shell prompt.

The cd command is how you change directories in Linux. There really isn’t a whole lot to learn with CD, but there are a few acronyms. One good option is to just type cd and hit Enter. This will always take you back to your home directory wherever you are.

7 Linux Commands Every Beginner Should Know

Alternatively, you can use an absolute path if you want to get into a directory that is not accessible by a relative path. In the example below, I have to use an absolute path starting at root (/) to navigate to etc / ssh.

7 Linux Commands Every Beginner Should Know

3.man (help pages)

The man command is probably one of the most useful commands in Linux. Even experienced Linux users cannot remember all the arguments of a Linux command. The man pages provide detailed information on all command arguments.

7 Linux Commands Every Beginner Should Know

The syntax is also very simple. It’s just a person followed by the command you want to know about. In the screenshot above, I did man ls to learn more about the ls command. One of the useful arguments to man is -k, which will allow you to search for all commands using the keyword.

7 Linux Commands Every Beginner Should Know

Above, I searched for the zip keyword and got back all commands that have the word zip in their names or descriptions. It’s a handy way to find commands that you might never have known about.

Along with man, you can use another command called info to get more examples of how to use the command. Just enter the command info to open the information page for that command.

4. Touch (Create File).

If you want to quickly create a new file, the easiest way is to use touch command. Actually the touch command is used to change the time stamp in a file, but another use is to create a new file.

7 Linux Commands Every Beginner Should Know

There are many ways to create files in Linux, and later on you will probably never use touch to create a file, but it’s very convenient in the beginning.

7 Linux Commands Every Beginner Should Know

If the file already exists when using the touch command, it simply updates the last accessed and last modified timestamps for the file as shown above.

5.cat (Concatenate Files and Print)

Another useful command is cat. The main function of cat is to concatenate multiple files, but it can also be used to output the contents of a file to standard output (that is, to the screen).

7 Linux Commands Every Beginner Should Know

You can use the -n argument to add line numbers to the output. If you use the -b option, it will only add line numbers to those lines that are not empty. If you use cat on a file that is longer than the height of your terminal window, only the bottom of the file will be displayed. You can pipe the output of cat to less or the more to view the contents of the file page by page.

7 Linux Commands Every Beginner Should Know

6.mkdir (create directory)

At some point you will want to create directories to better organize your data, and this is where the mkdir command comes in. You can use relative or absolute paths to create directories with this command.

7 Linux Commands Every Beginner Should Know

In the example above, I created two directories in my home directory using a relative path and an absolute path. If you need to create multiple hierarchical directories at the same time, you need to use the -p argument.

7 Linux Commands Every Beginner Should Know

In the example above, I used the -p argument to create the Aseem, Data and Pictures directories at the same time, although none existed.

7.RM (remove)

The rm command is a powerful command that can be used to remove files and directories. The rm command can delete directories that contain files and directories.

7 Linux Commands Every Beginner Should Know

To delete a file, just enter the file name. If you need to remove a directory that is not empty, you need to use the -r argument. It’s also a good idea to use the -i and -v arguments when using rm as it will ask you before removing anything.

7 Linux Commands Every Beginner Should Know

So, these are seven really simple yet common commands that you need to know in Linux to get started. There are many more, and soon I will be posting new articles for beginners about other commands and how to use them. If you have any questions, please leave a comment. Enjoy!

–

Share this:

  • Twitter
  • Facebook
Linux Tips

Post navigation

Previous Post: Fix Error 10016 in Windows Event Viewer
Next Post: Restrict Access to Cisco Switch Based on IP Address

Related Posts

  • The 5 Top Linux Distros You Should Be Using Linux Tips
  • TOP 5 Linux Distros for Gaming Linux Tips
  • Shutdown and Restart Your Computer From The Ubuntu Terminal Linux Tips
  • Display a List of Recently Installed Software Packages in Ubuntu Linux Tips
  • HDG Explains : What Is Sudo & Root On Linux? Linux Tips
  • Add Shortcuts to the Right-Click Context Menu in Ubuntu Linux Tips

Leave a Reply Cancel reply

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

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • 10 Things to Check Before Publishing a YouTube Video
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • How to reset your SIM card
  • This Simple Trick Lets You Play YouTube in the Background on iOS
  • How to go Back to the old YouTube Layout (2013)
DMCA.com Protection Status

Recent Posts

  • How to Get 2 Free Audiobooks From Audible Trial Instead of 1
  • 10 Things to Check Before Publishing a YouTube Video
  • MailTag: Real-time Email Tracking, Made Easy
  • Pokemon Sleep: what is it and how to play
  • How to Respond to Messages on Instagram (Mobile and PC)

Recent Comments

  1. This Simple Trick Lets You Play YouTube in the Background on iOS on YouTube Not Working? Here Are Quick Fixes To Try
  2. How to Bypass Chromecast DNS and Circumvent Geo Blocking on 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  3. 5 Cool Websites to Find Good Movies and TV Shows on Netflix on check netflix video quality internet explorer
  4. SmartDNS vs VPN “What’s the Difference?” on How to Watch Apple TV on Roku
  5. How to go Back to the old YouTube Layout (2013) on 10 Things to Check Before Publishing a YouTube Video
  • Use the Line In Audio Input on a Mac OS X
  • Best weight watchers points calculator 2018 2020

    Best weight watchers points calculator 2018 2020. 1 - LiCB CR2032 3V Lithium Battery(10-Pack) Top Reviews I was skeptic

  • Best canon calculator ribbon 2020

    Best weight watchers calculator 2017 2020. 1 - Calculated Industries 8305 KitchenCalc PRO Recipe Conversion and Culinary Math Calculator with 2 Digi

  • Best calculator ti-34 2020

    Best calculator ti-34 2020. 1 - Stokes Publishing TI-34 II Overhead Calculator TI253TK Desktop - Texas Device Features - TI34II Explorer Plus O

  • How to Use YouTube Music Collaborate Playlist Feature How-To
  • How To Disable Reserved Storage On Windows 10 Windows 10
  • How to get ChatGPT on iPhone and Android AI Tools & Guides
  • Best Gaming Headsets For The Ultimate Game Experience Product Reviews

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version