Operating Systems
This will be more understandable if we take it by an example. Let’s see how many users we have on the system: linux:~ # cat /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/bin/bash daemon:x:2:2:Daemon:/sbin:/bin/bash lp:x:4:7:Printing daemon:/var/spool/lpd:/bin/bash mail:x:8:12:Mailer daemon:/var/spool/clientmqueue:/bin/false news:x:9:13:News system:/etc/news:/bin/bash uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash games:x:12:100:Games account:/var/games:/bin/bash man:x:13:62:Manual pages viewer:/var/cache/man:/bin/bash at:x:25:25:Batch jobs daemon:/var/spool/atjobs:/bin/bash wwwrun:x:30:8:WWW daemon apache:/var/lib/wwwrun:/bin/false ftp:x:40:49:FTP account:/srv/ftp:/bin/bash postfix:x:51:51:Postfix Daemon:/var/spool/postfix:/bin/false sshd:x:71:65:SSH daemon:/var/lib/sshd:/bin/false […]
Continue reading about How to get columns from editor segregated by a delimiter in Linux
The command history is stored in the file ‘bash_history’ which you can access as follows: linux:~ # less ~/.bash_history The file contains a list of all the commands which are stored in the buffer. You can also see these commands in sequence with the line numbers by using ‘history’ command. linux:~ # history The history […]
Continue reading about How to retrieve command history in Linux/Unix servers
To display the files sorted in ascending order, we use the command ‘sort’. Suppose we have the following file and we want to sort out the data. linux:~ # more sort.txtBarrack ObamaGeorge BushBill ClintonRonald ReaganJimmy Carterlinux:~ # To sort the file we use the following command:
The environment variables are used by the shell and its child processes for normal execution of the programs. However, there are times when there is a need to add new variables for specific applications to work. First of all, check the environment parameters with ‘env’ command as shown below: To add the parameter simply use […]
Continue reading about How to add environment variables in Linux/Unix
Capturing the packets on a given interface is vital for troubleshooting problems caused by the application or even network. The commercial servers have multiple Ethernet cards some of which are active and others in a standby mode. In this situation, we must for know which interface card is active and then make the trace on […]
Continue reading about How to capture packets on Ethernet interface in SUN Solaris
Most of the programs use dynamic linked libraries so that they can take advantage of pre-prepared procedures in those libraries. However, if such a program doesn’t find the required library present on the system, it won’t run. In such a situation, you can use the ‘ldd’ command to check how many libraries that program is […]
Continue reading about How to check shared libraries dependencies in Linux
The file /etc/fstab contains the information about the mounted systems. The system reads this configuration at start-up to mount the required partitions on to the file system. An example of this file is shown below: As you can see, this file has all the information about the mounted partitions. Now, you can take a separate […]
Continue reading about How to backup the critical partition data in Linux servers
The design of the hard drive and the formation of the partitions of the file system varies from server to server. It mainly depends upon how much hard disk space is available and which applications would be installed on the server. If the server space is low, which should not be the case with commercial […]
Continue reading about How to design a hard drive layout (partitioning) on Linux servers
Usually, the switching between GUI and command line interface becomes essential for example, there can be a situation where a server might be having resource problems with its existing specifications. To enhance performance, one might shun the GUI. This can be done by simply changing the run level of the system. If the system is […]
Continue reading about How to switch between GUI and command line interface in Linux
The ‘shutdown’ command brings the system down in a secure and planned manner. By default, running this command with no options will bring the system to a single user mode. However, options can be used with this command to halt or reboot the system. Take some examples as follows: linux:/ # shutdown -r now The […]
Continue reading about How to shutdown/restart the Linux/Unix servers