Hey there, Linux fans ๐ Whether you're a seasoned Linux user or just starting your journey into the world of open-source awesomeness, this article is tailored specifically for you. Today, we'll dive into the essential yet easy Linux commands that every noob should know. And hey, even if you consider yourself a Linux pro, there might still be a trick or two up our sleeves that you haven't discovered yet! ;) (kidding, you should know these commands, come on ๐)
The command line interface (CLI) is the heart and soul of Linux, empowering you with incredible control over your operating system. Mastering a handful of key commands opens up a world of possibilities, allowing you to navigate, manipulate, and customize your Linux environment like a true wizard.
So, whether you're a curious newcomer, a recent Linux convert, or simply looking to brush up on your command line skills, you've come to the right place. Buckle up and get ready to unlock the true potential of your Linux journey.
Let's get started!
man
It is safe to say that man is one of the most useful commands. man is the manual command. If you don't know what a command does, you can use man to help you out. Here is an example:
man touch
After typing
man touch
, we get a manual page that shows us what touch does, which by the way, updates timestamps. You can use this command with any command that you like. I would say that this command is great for beginners, and pros ;)cd
cd
stands for change directory. You use this command to move from directory to directory. As an example, if you want to move to the Documents directory from your home directory, run this command:cd Documents
Once you run this command, the output you see depends on your file system configuration. When I run it, I get
/home/username/Documents
If you have a separate partition or mount point for the home directory, you may see this:
/mnt/home/username/Documents
Like I said, the output depends on how your file configuration is, but using the command is simple.
history
The
history
command displays the commands you used recently. This can come in handy if you need to copy and paste a long command. You can also always use the up arrow key to find recent commands.htop
the
htop
command allows you to monitor system resources or processes. When you run htop, you'll see a real-time display of vital system information, such as CPU usage, memory usage, load averages, and more.grep
One I used a lot at work,
grep
is used to search for certain terms in a file.The command I used is
grep dog test1.txt
nano
nano
opens up a text editor so that you can edit text files directly from the command line. It has a pretty straightforward interface, making it a great choice for beginners. In general, a lot of people tend to usenano
because of how easy it is to useHere is how to use it:
nano my_text_file.txt
A lot of people argue about the usage of
vim
andnano
. vim is a great choice, but it is more complex. Overall, choose whatever you like, and what you are more comfortable with.pwd
pwd
stands for print working directory. It tells you what directory you are in.All you do is type
pwd
and results vary on where you are, but this is typically the output to this command looks like this:/home/username
mv
mv
can remove or rename files and directories.Move a file:
mv file.txt /path/to/destination
Rename a file
mv file.txt new_name.txt
sudo
sudo
executes a command with administrative privileges.For example, you can update packages by running this command
sudo apt-get update
Some facts about the sudo command include:
- It keeps track of each command you run. This means that system administrators can view each command you run. But, if you are just using your computer you can always view these logs
- When you run sudo you will be prompted to type in your password.
- The use of sudo helps maintain a secure system since not everyone is allowed to run commands that require sudo
Overall, the
sudo
command allows you to run commands that 'normal' users would not be able to run.mkdir
You can use
mkdir
to create a directory.mkdir (name of directory)
To make things easier, remember to
cd
(change directory) into the directory you want to create your other directory in. If you don't, well at least you can use themv
command from above to move it to its rightful place. ๐
In conclusion, these ten Linux commands are fundamental tools that every beginner and everyone should know. With just these commands, you can navigate the file system, create and remove files, copy and move data, and even run commands with administrative privileges. Mastering these basics will provide a solid foundation for your Linux journey.
With that being said, this is just the beginning. Linux offers a vast array of powerful commands and tools waiting to be explored. In future articles, I will dive deeper into more advanced commands and concepts, helping you unlock the full potential of Linux.
To stay updated and receive notifications about my upcoming articles, be sure to follow me on my social media channels. Feel free to reach out with any questions or topics you'd like me to cover. Let's embark on this Linux adventure together!
Follow me on:
Happy exploring and happy Linux command line journey! ๐