Linux

Basic Linux commands

          In recent years, more people have begun to look into , explore, and try out the many features of Linux based operating System has to offer. One of the key features that Linux provides is an opportunity to use it’s terminal and command line features to perform useful operations.

Here is basic list of useful commands that can help you navigate a terminal that everyone should know.

1) Find command:

 

I’ll start with the basic find command and  some basic parameters

. -print

find -print this worked for me on my Ubuntu terminal

find .  This worked on my FreeBSD terminal
The find command can vary depending on which terminal version you are using and it often has arguments to use with the find command but they are considered optional. I strongly encourage you to find and test these commands to see what works in your terminal and remember that when using find command your privilege level matters. If you do not have a high enough user access, some of your  find results will return with a comment (you don’t have read permission).

 

Trying another parameter

find / -name “item”

 

the “/” after find will show the path names and (-name) means to do a specific search of the item you are looking for.

There’s more advance feature but this was a basic introduction of using the Find command

 

2)This command :

ps aux | sort -nrk 4 | tail

acts like a system monitor which can help you see what process is taking up the most computer power and memory.

 

3) The Command :

   Whoami

is a simple command that will help you visually see you are in the system. This matters because a person can Login as with different credentials and different privilege levels. This command will help you know who you on the fly.

 

4) The Finger command:

this will help you look up information on a User. As well there are multiple options to increase utilities of this command. Note , I had to install this package when using Ubuntu .

   finger $(input your USER)  

 

5) The command :

df -h

will display show all the disk size , what’s used, what’s available and what’s in use. Note that the [code]  -h   [/code]  is to have the output in a practical reading form as in G for gigs.

 

6) The

Locate command

  Location (file name)   

it’s similar to the find command but it’s not the same in that it is great for finding databases.

 

7) The Cat Command:

This command is often what I use when I want to get an information on particular file. Like most other commands , there are options to include with the CAT command

 CAT ( file)     

 CAT (file ) | less 

 

this helps in situation when there’s too much output and you need more specific database

 

Related Articles

  • Scanning for rootkits and possible exploits – RKHunter

    Rootkits are malicious softwares that are installed by intruders to gain access to your server once the security of the server has been breached.  Intruders can leave some malicious softwares...
  • Assign range of IP addresses to an interface.

    Sometimes you may need to assign a wide range of IP addresses to your network interface in Linux systems. Instead of manually creating aliases for the network interface, it is...
  • How to Manage a Linux Server with systemd

    What Operating Systems Have Adopted systemd? CentOS: Yes, by default since CentOS 7 Fedora: Yes, since the release of Fedora 15 RedHat: Yes Debian: Yes, shipped since Debian 7 as...
  • Verify RPM package integrity

    In the case of Centos/RedHat OS, RPM tool can be used to verify the integrity of the installed package and check if any of the package has been compromised or not....