How To Reboot Linux System Using Command Line

Posted at January 5, 2017 at 4:53 pm by Jithin

Refer the following video tutorial if you want to know how to restart VPS via "my.interserver.net". If you prefer to reboot via command line tools then read further. [embed]https://www.youtube.com/watch?v=DWl3PrHOj9A[/embed]   In this tutorial we can learn how to reboot the Linux system using command line tools. If you have a single board computer or you are running a headless computer (one without a display) then you might want to know how to shut the computer down and restart    [...]

Read More

Linux Top Command Usage with Examples

Posted at January 5, 2017 at 4:52 pm by Jithin

One of the most basic command to monitor processes on Linux is the top command. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. The processes are listed out in a list with multiple columns for details like process name, pid, user, cpu usage, memory usage. Apart from the list of processes, the top command also shows brief stats about average system load, cpu usage, and ram usage on the top. Top is one of the important tool for moni   [...]

Read More

How to Safely Delete Files and Directories Using Linux Command Line

Posted at January 5, 2017 at 4:31 pm by Jithin

In this tutorial we can check how to safely delete files and directories using Linux Command line To remove a file or directory in Linux, we can use the rm command or unlink command. The rm command removes each specified file. By default, it does not remove directories. Also, it does not work on directories that contain files. The rm command (short for remove) is a Unix / Linux command which is used to delete files from a file system. Usually, on most filesystems, deleting a file requires wri   [...]

Read More

Linux Cat Command Usage with Examples

Posted at January 5, 2017 at 4:30 pm by Jithin

The cat command (short for “concatenate “) is one of the most frequently used command in Linux/Unix, Apple Mac OS X operating systems. cat command allows us to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files. It is a standard Unix program used to concatenate and display files. The cat command display file contents to a screen. Cat command concatenate FILE(s), or standard input, to standard output. With no FILE, or when FILE is   [...]

Read More

Linux lshw Command.

Posted at November 29, 2016 at 1:51 pm by Jithin

In this tutorial, we will discuss on the lshw command which provides detailed report about the hardware on the system. The /proc directory helps to generate such detailed report for lshw command. The lshw command provides more detailed output than other hardware related commands in Linux.   1) Display full information Just typing the lshw command itself provide all the detected hardware details   $ lshw centos7.is.cc description: Computer product: KVM vendor: Red Hat v   [...]

Read More

Linux man command

Posted at November 29, 2016 at 1:49 pm by Jithin

The man pages are interface to the on-line reference manuals and man command is used to format and display the man pages. The man pages are a user manual that is built by default  into most Linux distributions  and other Unix-like operating systems during installation. Man pages come from various sources and although most of them are similar, it can be contain tables, mathematical equations, and bibliographic references. Man pages are the work result of so many people doing their best to descr   [...]

Read More

DirectAdmin dead but subsys locked Error

Posted at November 29, 2016 at 1:43 pm by Jithin

In this tutorial, we can check how to fix "DirectAdmin dead but subsys locked" error. DirectAdmin DirectAdmin is a web-based hosting control panel designed to make administration easier. DirectAdmin is compatible with the constantly evolving web hosting environments. DirectAdmin is often called DA for short. DirectAdmin runs on any system with minimum configurations. DirectAdmin uses port 2222 by default.   Check DA status This will help you to know whether your DirectAdmin i   [...]

Read More

Linux watch command

Posted at November 18, 2016 at 6:08 am by Jithin

Watch command is one of the most useful commands which mainly helps to keep an update on various system administrative processes. Today’s   Internet facility provides for the hackers to intrude into any system which is not well secured and regularly monitored for such attacks. These all can be monitored through the log files which are updated regularly. These regularly updated logs can be checked by executing the commands frequently. Since it is a tedious task to execute the commands repeate   [...]

Read More

Commands to check hard disk partitions and disk space on Linux

Posted at November 11, 2016 at 12:53 pm by Jithin

These commands output will provide information regarding the total size, memory consumed and file system.   Fdisk In order to display all the partitions on a disk. File system details also can be seen from this command. But the only thing is that it won’t show the disk partition size.  $ fdisk -l Disk /dev/vda: 53.0 GB, 52953088000 bytes, 103424000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/   [...]

Read More

Linux Commands to Check Mounted Files on the System

Posted at November 11, 2016 at 12:46 pm by Jithin

The common commands to check the mounted devices is the mount command. It can also mount and unmount them whenever needed. In this tutorial, we will discuss about a command similar to the mount command which is called findmnt.   Installation of findmnt The command can be found in the package util-linux which is installed by default on most of the distributions. $ aptitude search util-linux i   util-linux                     - Miscellaneous system utilities   [...]

Read More

About Traceroute

Posted at October 28, 2016 at 4:28 pm by Jithin

The traceroute is a necessary tool that every network admin should be familiar with. This feature will help you to troubleshoot  network issues effectively.   What is Traceroute? The Traceroute is a utility that records the route through the Internet between your computer and a specified destination computer. It also calculates and displays the time each hop took.   What is Hop? In a packet-switching network, a hop is the trip a data packet takes from one router or inter   [...]

Read More

Unix Z Commands

Posted at October 28, 2016 at 4:23 pm by Jithin

In this tutorial we can discuss about some of the powerful Z commands in Linux to perform normal operations on a compressed file. Some Z commands uncompress the file temporarily in /tmp directory to perform the operation defined. An advantage of using Z commands to uncompress a file is that it does not really uncompress the files to perform the operation. It will be a great relief for those who really are not intended to uncompress the compressed files for any verification or checking purposes.    [...]

Read More

Linux Kill Command

Posted at October 28, 2016 at 4:22 pm by Jithin

The kill command is an excellent command to terminate a process directly without having to reboot or logging out the computer. Before killing a process, it would be wise to know what is process. Process is known as a running instance of a program, which can also be called as task executing or running. These running instance so called process are assigned by a unique process identification number called (PID). The assigning of the process identification number (PID) is automatically created by th   [...]

Read More

Touch command in Linux

Posted at October 28, 2016 at 4:21 pm by Jithin

The touch command is used to create an empty file and also to change the modified time of a file. The syntax of the touch command is  touch [OPTION]... FILE... 1) Create a blank file. Touch command allows to create a blank file. In case if the file already exist it will change the access time of the file. $ touch test.txt 2) Create multiple files with touch. By giving a line of separation among the name of the files will allow you to create multiple files at a time. $ touch test.t   [...]

Read More

How to Use IP Command in Linux

Posted at September 22, 2016 at 5:50 pm by Jithin

IP command is a command with more features that ifconfig. The command helps to do various tasks related to network administration. Today, ifconfig command is the least used command.   Setting and Deleting an IP Address $ sudo ip addr add IPaddress/24 dev eth0 In this the IP address includes a prefix. This is used to show the subnet mask used. (Replace IP address with exact IP address) To verify the changes, show command can be useful. $ ip addr show wlan0 The same steps can    [...]

Read More

Linux iostat Command

Posted at September 22, 2016 at 5:47 pm by Jithin

The command used to measure the load on the input/output devices with reference to the time the devices are active with respect to the average transfer rates of the devices. It provides the usage of the input/output devices and processor. The reports created by the iostat provides the details to alter the       system configurations to maintain the balance of the input/output between physical disks.   Installation of iostat On RedHat / CentOS / Fedora # yum install sysstat   [...]

Read More

Basic shell commands in Linux ( For Linux Beginners )

Posted at August 22, 2016 at 11:08 am by Jithin

A shell is a user interface that provides access to an operating system. It is a program that takes your commands you type from the keyboard and gives them the operating system to perform the required task. After the task is completed it displays the output.  A shell is an environment in which we can run our commands. A program called 'bash' acts as the shell program in most Linux systems. The prompt, $, which is called command prompt, is issued by the shell. While the prompt is displayed, y   [...]

Read More

Install WordPress over SSH

Posted at November 23, 2015 at 2:29 am by Jithin

Though WordPress installation is possible through web hosting control panel like cPanel or Plesk, this documentation is about WordPress installation on VPS, Quick server or Dedicated servers with no control panel installed in it.   Step 1: Connect to server over SSH. Then go the location where WordPress needs to be installed. In my case, I want to install WordPress in the home directory of the user “test”. Also it is the document root of my domain “mydomain.com”. root@W   [...]

Read More

Using screen to attach and detach console sessions

Posted at October 23, 2015 at 8:30 am by InterServer Staff

If you run a program in SSH, and then close out ssh you can not get back into the console. However you can use screen to attach + detach a console. If you have centos, run yum -y install screen If you have debian/ubuntu run apt-get install screen Once installed, screen is simple to use. Type screen run the command you want to run, for example ./run_server.sh to detach run: ctrl + a + d Once detached you can check current screens with screen -ls Use screen -r to attach a single sc   [...]

Read More

Using Putty to SSH to Server

Posted at October 23, 2015 at 8:30 am by InterServer Staff

How to connect to putty? Download PuTTY from this site  http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html  You will see many options but for Windows, the "putty.exe" download is enough. Have a look at the screenshot below. You will also need your SSH login credentials. Save the download to your C:\WINDOWS folder.                         &nbs   [...]

Read More

Installing binary node.js on Linux

Posted at October 23, 2015 at 8:27 am by InterServer Staff

To install node.js, log into your vps or server through SSH. Get the linux binary based on your os at http://nodejs.org/download/ either 32 or 64 bit. To see the architecture run: uname -m i386 or i686 use 32 bit x86_64 use 64 bit For example on a 64 bit server as of this writing: wget http://nodejs.org/dist/v0.10.25/node-v0.10.25-linux-x64.tar.gz untar with tar -zvxf node-v0.10.25-linux-x64.tar.gz cd node-v0.10.25-linux-x64/bin   run ./node path/to/.js

Read More

Install VSFTPD on centos servers (FTP daemon)

Posted at October 23, 2015 at 8:26 am by InterServer Staff

On centos/RHEL based systems vsftpd is available. To install, become root - we will be using yum going forward. This process is meant to be done on a system with out a control panel (ie cpanel / directadmin) which already provide ftp. install vsftpd yum -y install vsftpd edit /etc/vsftpd/vsftpd.conf I prefer nano, other editors are vi nano -w /etc/vsftpd/vsftpd.conf Note: its possible the config file is /etc/vsftpd.conf on older systems - normally it is not normal setup: change anonymous_e   [...]

Read More

Installing a lamp stack on Ubuntu / Debian

Posted at October 23, 2015 at 8:26 am by InterServer Staff

On ubuntu, you can install the LAMP stack (apache / php / mysql) using apt For example: apt-get update apt-get install mysql-server apache2 php5-mysql apache2-mpm-prefork Choose your php method: libapache2-mod-php5 - server-side, HTML-embedded scripting language (Apache 2 module)libapache2-mod-fcgid - an alternative module compat with mod_fastcgilibapache2-mod-suphp - Apache2 module to run php scripts with the owner permissions   and install PHP   apt-get install libapache2-mo   [...]

Read More

How can I view the contents of a text file?

Posted at October 23, 2015 at 8:10 am by InterServer Staff

Type: cat filename

How can I use PICO?

Posted at October 23, 2015 at 8:10 am by InterServer Staff

To use pico just use the arrow keys to move the cursor. To find something type ctrl w To exit and / or save type ctrl x To find out what line you are on type ctrl c To go to a specific line type ctrl w then type ctrl t and enter the specific line

How can I edit a file?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

Type: pico filename

How can I debug a cgi script?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

Move into the directory the file is in. Type: ./filename.cgi You can use the output to correct the errors.

How can I execute a program, but send it to the background?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

Execute the file as normally but add the & sign. Sample root@acute [/scripts]# /scripts/ftpupdate& [1] 26371 root@acute [/scripts]# Type jobs to see any programs running in the background. You can type fg to bring it back to the foreground.

How can I change directories?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

cd directoryname Sample: root@acute [/]# cd home root@acute [/home]#

How can I check permissions on a file?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

ls -l root@acute [/home/trouble/.htmltemplates]# ls -l total 12 drwxr-xr-x 2 trouble trouble 4096 Mar 7 15:37 ./ drwx--x--x 14 trouble trouble 4096 Mar 7 15:37 ../ -rw-r--r-- 1 trouble trouble 159 Mar 7 15:37 default

How can I check disk space?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

Type df -m Sample (in megabytes): root@pentagon [/]# df -m Filesystem 1M-blocks Used Available Use% Mounted on /dev/hda8 248 197 39 83% / /dev/hda1 15 2 12 16% /boot /dev/hda6 3563 367 3015 11% /home2 /dev/hdb1 19235 6808 11449 37% /homeroot /dev/hda5 3563 871 2511 26% /usr /dev/hda7 248 60 176 25% /var Of Specific Dir du -sm Sample (in MB): root@pentagon [/home]# cd jump root@pentagon [/home/jump]# du -sm 7 .

Read More

How can I see all the files in a directory?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

Type ls Sample root@pentagon [/home/jump]# ls ./ .bash_history _bak public_ftp/ server.php3* www@ ../ 4* gotcha public_html/ usage.php3*

How can I check all running services?

Posted at October 23, 2015 at 8:07 am by InterServer Staff

Type: pstree