Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Mobile data not working on your Samsung phone? Try These 12 Fixes Smartphones
  • How to Play Minecraft: A Beginner’s Guide Gaming
  • Is a Smartwatch Worth It? Gadgets
  • Best ti-15 calculator 2020

    Best ti-15 calculator 2020. 1 - TEXTI15 - Texas Instruments TI-15 Explorer Elementary Calculator Top Reviews I bought t

  • 15 Best Meeting Minutes Templates to Save Time Software Reviews
  • How to Control a WeMo Insight Switch using Alexa & Echo Gadgets
  • Best calculator ti-84 plus 2020

    Best calculator ti-84 plus 2020. 1 - Protective Case for Texas Instruments TI-84 Plus Top Reviews I ordered this case a

  • ChatGPT AI Tools & Guides

7 Linux Commands Every Beginner Should Know

Posted on October 9, 2020 By bilal 1983 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:

  • Facebook
  • X
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

  • How To Sync Ubuntu To Your Google Drive Linux Tips
  • 10 Most Popular Software Choices for a New Ubuntu User Linux Tips
  • Gravel calculator Calculator
  • Make a Custom Live Linux Distro with Linux Live Kit Linux Tips
  • How to Install VirtualBox Guest Additions in Ubuntu Linux Tips
  • Use the Linux ‘dd’ Command With A Simple GUI Linux Tips

Leave a Reply Cancel reply

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

Archives

  • December 2023
  • November 2023
  • October 2023
  • 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

  • – 436
  • – 939
  • 1xBet giriş, güzgü 1 xBet Azərbaycanda rəsmi sayt – 413
  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • B1 Bet Aviator: Jogo de Cassino Online Tutorial Passo a Passo 202 – 14
  • Calculator
  • Computer Tips
  • Cool Websites
  • Dasinmaz emlak elanlari, ev elanlari, ev alqi satqisi, kiraye evler, torpaq, obyekt, bina, bina ev, mənzil, villa, kreditle satilan evler – 814
  • 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
  • Tutorial
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • бонусы до 250%, официальный сайт в Узбекистане – 69
  • Мостбет Уз Ставки на спорт и казино в букмекерской конторе Mostbet Uz – 527
  • ベラジョンカジノの出金方法一覧【2023年 最新】出金限度額・出金の流れ・出金手数料・出金条件 – 466
  • How to Flush DNS Cache on Windows, macOS, Android and iOS
  • How to Automatically Mute your Mac When it Wakes Up From Sleep
  • How to Connect USB Mic to Smartphone for Video Recording
  • How to Share HQ Images on WhatsApp Without Any Compression
  • How to get Android O Features on any Android Smartphone
DMCA.com Protection Status

Recent Posts

  • Remove Shows From Continue Watching on Netflix App (Android | iOS)
  • How to Flush DNS Cache on Windows, macOS, Android and iOS
  • 5 Effective ways to stay Anonymous on Android
  • How to Share HQ Images on WhatsApp Without Any Compression
  • How to get Android O Features on any Android Smartphone

Recent Comments

  1. Instagram stories not working/loading? Try These 9 Fixes on Can’t update PS5 system software? Try These 10 Fixes
  2. How to Link to a Specific Part Of A Webpage & Share it on Best PDF to Word Converter Online (Free Without Email)
  3. See What’s Taking up Space on Your Hard Drive on 7 best 3D scanning apps for Android and iOS
  4. Make your Devices Read Out Text, With Text to Speech on 9 Best 10K Running Apps for 2023
  5. How to Find your Router’s IP Address on How to Fix Apple CarPlay Not Working? 7 Possible ways
  • 13 Troubleshooting Tips For When Dropbox Files Are Not Syncing Help Desk
  • How to Disable Windows Firewall With Command Line How-To
  • 14 Best Gmail Chrome Extensions to Get the Most out of It (2020) How-To
  • How to Change the Background in Google Chrome Google Software/Tips
  • sepco bill calculator

    The sepco bill calculator is online check calculator.This help you to calculate you bill. Sukkur Electric Power Company or SEPCO is an electric dist

  • 6 Ways To Password Protect a Folder in Windows How-To
  • Add a Cover Page to a Word Document MS Office Tips
  • 4 Free/Cheaper Rosetta Stone Alternatives Computer Tips

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version