linux commands

Linux find command basic tutorial

The Linux find command is perhaps the most powerful command for finding files in the Linux system. However, it is quite complicated. For a Linux beginner, first they need to understand the command's expressions before they can properly use the command. This tutorial will help a new Linux user to understand the basic expressions through simple examples.

Here are some important basic Linux find command's expressions that a Linux beginner should notes:

Change user or substitute user in command line terminal using Linux su command

The Linux su command is often use when performing administrative task in Linux system. Linux system administrator or Linux user do not use root as a personal account. When a certain task needs root privilege, then the Linux su command, which is used to substitute user, become useful. The Linux su command allows user to switch to other UID and GID from the command line terminal. Here is a description and synopsis from su manual page:

Linux top command tutorial

Linux top command is a great tool to monitor Linux performances and troubleshoot Linux problem. It is available in default Ubuntu and Slackware installation. We can view a dynamic real-time view of a running system using top command. What you have to do is just type 'top' in the Linux command line terminal and press enter to see top command prints a table of Linux processes and system summary.

Here is an example of top command screenshot:

Linux vmstat command tutorial

Linux vmstat command is a useful tool for monitoring performance in Linux system. It comes standard in Ubuntu and Slackware installation. We can get information about virtual memory(vmstat is a short form of virtual memory) and some other things such as Linux processes, cpu activity and block IO.

Here is the Linux vmstat command synopsis from the manual page:

Linux alias command tutorial

The Linux alias command is another utility to make working in Linux command line easier. We can make an alias for a long Linux command with options and arguments to a simple command. The alias command is very useful for a Linux system administrator which has lots of routine jobs such as checking log files, clean hard disk space, and so on. Let's see some examples of alias command and the usage.

Linux kill command tutorial

Linux kill command sends signal to a Linux process. Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. Alternate signals may be specified in three ways: -9, -SIGKILL, -KILL. That's what you can read from the Linux kill command manual page. If you don't quite understand what those descriptions are, here is a simple explanation for you. Every Linux user needs to learn the Linux kill command because it is particularly used to terminate Linux process(Linux process or Linux daemon).

Linux dmesg command tutorial

'dmesg' command is used to examine or control the kernel ring buffer. The program helps users to print out their bootup messages. Instead of copying the messages by hand, the user need only:

dmesg > boot.messages

and mail the boot.messages file to whoever can debug their problem.

If you want to go through the message line by line, try dmesg with this option:

dmesg | less

or you can use 'grep' to pick up what you need. For example:

dmesg | grep hd

Linux w command tutorial

The Linux w command shows who is logged on in Linux system and what they are doing. Its function is identical to the Linux who command but the w command output provides more detail than who command.

Linux w command syntax

Here is the Linux command syntax:

w -husfVo user

The '-husfVo' is the w command's options while the 'user' is the username of the Linux user that we want to check.

Here is the meaning of the w command options:

Linux pwd command tutorial

The pwd command is used quite often in the Unix command line environment where the shell doesn't show the name of the working directory. Type 'pwd' in the command line will print the name of current/working directory. In Linux, where bash is the default shell, we can always see what directory we are in. The name of the current directory is shown at the command prompt after the host name. See the example below:

Linux users command tutorial

The Linux users command is a useful tool to monitor users in Linux system. When invoking the 'users' command with no option, it prints the user names of users currently logged in to the current Linux system. The Linux users command output who is currently logged in according to 'file', by default using the /var/run/utmp if 'file' is not specified.

This is the Linux users command syntax:

users [OPTION]... [ FILE ]

Here is an example on how to run Linux users command with no option in Slackware:

Pages

Subscribe to RSS - linux commands