Basic commands used on linux terminal part 2
On this part we will discuss about few more commands of linux. On last part we discussed about 10 of the most basic commands and it will continue on this post too. But we will talk about next 10 commands we need to learn at the beginning.
- Tail – this command shows the output of last 10 lines by default. It is mostly used to monitor the changes of a system log or information appended in a file when the changes are occurring real time. Usually the new inputs to a file are shown as a output in this command.
example: #tail /var/log/message
- Man – stands for manual. This command is used to read the manual of any documented command of linux system. It is also a detailed form of the help parameter usually every commands have. Using help parameter we can get the summary of a command parameters but using man we can get which parameter is used for which reason and how that parameter should be used.
example: # man ls
- Head – the head command is used for the same reason as tail. but it will show the top lines of a file. also we can read the information that is continuoiusly putting into a file. we can define lines or the line from which we want to start reading. this command is used mostly in log reading.
example: head /var/log/access.log
- Fdisk – this is one of the most popular disk management tool. this tool is build in into centos distribution. it can create delete and modify disk properties. fdisk is easy to use. if we can remember few parameters then we can easily handle disk properties using this tool.
example: fdisk /dev/sda
- df – this command known as disk fileformate. it is another popular disk management tool. also we can get this utility by default with the operating system. this shows the file system of a disk with it’s size and other properties. a very useful tool to troubleshoot the disk related problems.
example: df –h /var/
- du – this command is known as disk utilities. another command to find disk related informaiton and file system properties. easy to use almost similar to df. the basic differnece in df and du is in du an argument is must and in case of df argument is not mendatory.
example: du –h /var
- chown – this command is known as change ownership. it is used for changing file and folder’s user and group ownership. it has few particular parameters by which we can change a particular property of a file or a folder.
example: chown user:group foldername
- chmod – this is known as change mode. it is used for change the permimssion of a file or a folder. simply a file or folder have 3 permissions. by using this command we can change any of the permission we need.
example: chmod 644 foldername/ filename
- chgrp – this is known as change group. this command particularly works with group permission. this is also used on both files and folders. it has limited parameter.
example: chgrp groupname foldername
- Stat – this is a command to view the status of a file or a folder. it has verity of parameters to view the files properties and it is a good audit tool on linux.
example: state /var/www/
On next blog we will discuss about few more commands and I hope we will be able to remember a good number of commands for our future work.