Basic Linux/unix Commands - Part 2
Let we start the basic Linux/unix Commands - Part 2
find Command
1. find command is used to search the location of a particular file.
2. The syntax is presented below.



Note: In coming section, we post the find command with briefly.
locate command
1. The locate command is similar to find command, but it takes only one argument.

For instance,

Output

2. The locate command uses a database of all the system's possible files and directories to search.
3. The find command is significantly slower than the locate command.
4. The find command, on the other hand, is far more powerful and can be used when locate fails
to deliver the needed results.
uptime Command
1. The uptime command reports the amount of time your system has been running since it was
turned on the previous time.
2. You can use the uptime command without specifying any parameters.
3. The current time, number of users with active sessions, and system load averages for the
previous 1, 5, and 15 minutes will all be displayed in uptime.

4. How to Check the Uptime of a Linux Server? By using this below command, you can able to filter it,

5. By using below mentioned command, you can able to Check the Starting Time of a Linux Server

uname Command
1. The uname command displays basic information about your operating system and the
hardware it runs on.
2. Without any options, it will show like this only,

3. Add the -a option to disclose full information about the kernel, including its name, version, and release, as well as the machine, processor, and operating system.

4. The -r option is used to display the kernel release.

5. Use the -v option to get the kernel version.

6. Check out the following section for more options.

whoami Command
As illustrated here, the whoami command displays the presently logged-in user.

w Command
The w command displays information about the users who are currently logged in and also
show the uptime, load average.

free Command
1. The free command displays statistics on swap and main memory consumption.
2. It shows the overall memory size, used memory, and available memory.

3. Add the -h option to display information in a more human-readable style.

4. The most important options
-b, – -bytes: The memory is displayed in bytes.
-k, – -kilo: It shows the memory size in kilobytes (default).
-m, – -mega: It displays the amount of memory in megabytes.
-g, – -giga: It displays the amount of memory in gigabytes.
- tera: It shows how much RAM is in terabytes.
-h, – –human: It will display a format that is readable by humans.
top Command
1. The top command is used to display the current state of Linux processes.
2. It is one of the most important monitoring tool.
3. It gives you a dynamic, real-time view of the system as it runs.
4. This command usually displays the system's summary information as well as a list of
processes or threads that the Linux Kernel is currently managing.


5. Let's have a look at what each column indicates in more detail.
PID - This is the process ID that identifies a process.
USER – This is the username of the user who started the process or spawned it.
PR – This is the task's scheduling priority.
NI – This is the process or task's pleasant value.
VIRT – This is the amount of virtual memory that a job consumes.
RES - The memory that a process uses.
SHR - The amount of memory that a process uses and that is shared with other processes.
The process's CPU use is expressed as a percentage.
%
RAM – The percentage of RAM used.
TIME+ – A process's total CPU time since it began operating.
COMMAND – This is the name of the process.
6. Run the command to see processes specific to a single user.

ps Command
1. The ps programmer displays the PIDs of all presently active processes in the current shell.

2. Use the -u option to list the user's presently executing processes, as shown.

sudo Command
1. sudo access - similar to root privileges
2. The sudo command allows you to run applications with another user's security rights (by
default, as the superuser).
3. sudo is a command-line tool that allows a non-administrative user to conduct administrative
or elevated functions.
4. Make that the user has been added to the sudo group before using the command.
5. To update the package lists, for example, run the command:

6. You will be asked for a password before the task can be completed.

That’s It! In this topic, we have covered Basic Linux/unix Commands - Part 2
Comments
Post a Comment