Archive for linux web hosting

Useful Vi Editor Commands (Visual Editor)

The vi editor also named as Visual Editor is one of the oldest screen-based editor and older version of vim editor used by many Unix/Linux users. It can be used from any unix based terminal interfacing. Since, the vi editor is not as a WYSIWYG, a user doesn’t have formatting capabilities such as creating paragraphs, changing fonts, line centering, etc…

Here, in this article, I have mentioned only those vi editor commands that are standard and most useful. It states, Starting vi, moving around with vi commands, editing files with vi editing commands, and colon “:” commands:

Opening a file using vi editor:

Simply enter the following command at the terminal command line to open single or multiple files:

vi myfileone myfiletwo

where myfileone and myfiletwo are the names of the files which you want to open.

Moving around with the vi editor commands:

Moving around is one of the challenging tasks for beginners in vi editor. In order to do so, place the vi editor in command mode simply by pressing the “Esc” key. Following are the commands that can move the cursor in vi editor.

Commands Actions
h or ← Moves the cursor to left
l or → Moves the cursor to right
j or Moves the cursor down
k or Moves the cursor up
^F or PageDown Moves screen one page down
^B or PageUp Moves screen one page up
^U Moves screen half a page up.
^D Moves screen half a page down
^E Moves the screen one line down
^Y Moves the screen one line up
+ Sends to the beginning of the next line
- Sends to the beginning of the previous line
0 (zero) Sends to the beginning of the current line
$ Sends to the end of the current line
} Sends to the next blank line
{ Sends to the previous blank line
[[ Sends to the beginning of the file
]] Sends to the end of the file
Switch you between beginning of file and current line
b Sends punctuation mark or one word back
B Sends one word back , including punctuation marks
e Sends to the end of the next word or punctuation mark
E Goes to the end of the next word, including punctuation marks
gg Goes to the top of the file
G Goes to the end of the file
^H Goes one character back, including newlines
H Goes to the top of the current page
^P Goes one line up
L Goes to the bottom of the current page
w Goes to the beginning of the next word or punctuation mark
W Goes to the beginning of the next word, including punctuation marks
^Z Suspends the vi; You can use the “fg” command to resume
ZZ Save the file and exit.

Editing files using vi editor commands:

To edit a file in vi editor, simply place the editor into a command mode. In order to edit a file in vi, place the editor into command mode.

back-space Removes the character before the cursor
del Removes the character mentioned under the cursor
i Inserts text under the cursor
I Inserts text under the cursor starting from the beginning of the current line
a Inserts text starting after current character
A Inserts text starting at the end of the line after the last character
cc Removes the whole line and moves into insert mode
cw Removes the current word and moves into insert mode.
C Deletes to the end of line and moves to insert mode.
Y Yank, copy current line to buffer
dd Removes the current line
dw Removes the current word
D Removes current line (but leave the newline)
J Joins the next line with the current line
o Inserts after the current line
O Inserts before the current line
p Pastes the lines in the buffer (from Y, dd, or x) after the current line
P Pastes the lines in the buffer before the current line
rc Overwrites with the character c, or replaces the current character
R Change to overwrite mode
s Removes the current character and moves into insert mode
S Removes the current line and moves into insert mode
u Undo the last activity
U Switch you between undoing and redoing the last edit
v Visual: starts the selection for a “d” (delete) or “Y” (yank). Simply move in the direction using movement keys after typing “v” to see the selection
V Visual line: selects the current line for deletion or Yank
x Removes the character under the cursor
X Removes the character after the cursor
~ Capitalize the current character
== Unindents the current line by typing the equal sign two times
. Repeats the last command
F1 Shows online help

Using colon “:” vi commands: 

:w Writes to the file; If file name is not given on the command line, it will complain
:w file-name Saves the file to specified filename
:q Quit. In vim editor, also exits from help.
:q! Quits without saving.
:wq Writes to the file and quit (same as “ZZ” command)

cPanel Hosting UK

Related Posts:

  • No Related Posts

Modify / remove xorg.conf via Terminal/Command Line – Linux – Ubuntu

If you have added options to the xorg.conf file that breaks something, for example not being able to get to the login screen, to modify or remove xorg.conf, close to when the login screen would usually appear, press CTRL + ALT + F1 and, by now, you should have an Internet connection active; for example, if you have connected to your WiFi network before.

First, install vim if you haven’t already got it installed already:

sudo apt-get install vim

Afterwards, edit the xorg.conf file using vim:

sudo vim /etc/X11/xorg.conf

To insert text, press i, then esc when done. To delete an entire line, dd (that is, the d key twice). To quit without saving changes, :q. To save changes, :wq. So, for example, press esc then type the : (colon character) then q (the Q key).

Other interesting information if applicable

To remove xorg.conf, use:

sudo rm /etc/X11/xorg.conf

To reconfigure xorg.conf, use:

sudo dpkg-reconfigure xserver-xorg

Then reboot:

sudo reboot

Want to remove vim afterwards?

sudo apt-get remove vim

Related Posts:

How To Choose Best Server Operating System ?

Supporters of each operating system would provide you with different solutions to this common question ? however, it is crucial for you to determine which operating system is best suited for your requirements.

The OS option consists of various free open source operating systems licensed under the GNU/Linux and many trademarked processes of UNIX. Before we delve into which OS would be the best suited to your requirement, allow me to mention some important factors that should be considered when selecting an operating system for your dedicated server.

  • Price : Unlike any other major expenses, when purchasing an operating system you should look more than just the cost of the operating system. The TCO should be looked more than the price tag (ie. total cost of ownership). Things such as OS maintenance, upgrades and issues fixing cost should be considered when choosing an OS.
  • Longevity : You should look for an operating system that exists for a long period of time providing regular security and stability updates.
  • Technical Support : You should know how much support you need relating to the operating system you choose. If you are equipped with an IT staff, you would be easily able to manage the free Linux OS versions such as CentOS. Else, you will have to acquire some kind of support licensing for the type of operating system you decide.
  • Security : A fact that, the operating systems are only secured when you make them secure. Some of the OS might look hard and confusing however, there are some operating systems which are a lot easier to make them secure. Depending on such factors you should evaluate and determine which OS suits better to your requirement and is easy to handle and manage.
  • OS Flexibility : With some OS you might not be able to make customizations, however, if you want such operating system, then you could prefer the free open source operating system like Debian or the Free BSD. Afterall, the selection depends on your requirements.
  • Softwares : There are some softwares that are supported only on specific operating systems. If your requirement is similar then it will definitely aid you determine which operating system is better for your needs.

Related Posts:

Budget Hosting for Small Scale Business

Budget hosting is a type of hosting plan that suits most of the small scale business websites. The well known shared hosting or cPanel web hosting which is used widely can also be count as a Budget hosting plan.

These type of plans are simple and easily affordable to any small business that wish to create an online presence for their website. There are many such reliable web hosting plans which fulfill the basic hosting needs within minimum investments.

Shared Hosting Plans: This is one of the popular form of web hosting having huge demand in the hosting industry. This hosting plan allows you to host more than one website as add-on websites with full cpanel access. It has emerged as the most preferred option for millions of websites and small business. Shared hosting is the best way to start with your online venture as it allows you to start a small business in minimum cost and is a great solution for personal use, hobby sites or small online business with few products. The only drawback of shared hosting is that you have share the server resources with thousands of websites.

Domain Web Hosting Plans: Much similar to shared hosting, this plan allows you to host multiple domains or websites under one single account. All the websites hosted on the domain web hosting plan includes PHP 5, MySQL databases, WordPress, FrontPage and unlimited FTP uploads. The multiple website hosting solution has become a quite common and popular these days as you can manage your multiple website more efficiently with the cPanel offered on Linux. There isn’t any kind of restriction on the Linux based domain web hosting package as you can host as many websites as you want.

Windows Web Hosting: This is another preferred uk web hosting solution of small business owners. The windows hosting plan is the best combination of quality, features and affordability. This plan is built especially by keeping the clients needs in mind. The uk windows hosting pan includes the most powerful control panels such as Plesk and DotNetPanel that ease the management of multiple domains. On the basic windows hosting plans most of the providers will allow you to host up to 5 domains with unlimited sub-domains. Some providers might provide you a SiteBuilder as an add-on to build professional looking websites very easily.

The main advantageous features of these plans are as follow:

Cost-efficiency – All the above plans offers a low cost web hosting solution, that anyone can afford it. People who wish to start an online business but cannot opt for VPS and Dedicated can go with these kind of solutions that allows them to build a professional website and create a successful online venture.

Simplicity – The above hosting plans describes the primary concept of managed hosting, which normally denotes to the dedicated hosting solution. As the server is shared between number of websites, the server management is handled by the hosting company itself. You don’t have to worry about the server management task as you need to do in the dedicated hosting. These are the best solutions for people who don’t have any manpower and don’t have any knowledge of running a web server. The administrative tasks held by the hosting provider allows you to concentrate on the critical aspects of your online business.

No matter which hosting solution you choose to start your online venture or business, make sure to find a reliable and stable hosting provider who can offer you round the clock technical support with a minimum response time. This is one of the most important factors need to be considered when choosing a uk web hosting solution.

Related Posts:

4 Most Usually encountered Errors in Linux Hosting and their Solutions

When it comes to web hosting platforms, Linux is considered to be one of the widely preferred operating systems across the globe. With Unix as the base language, Linux has become one of the biggest competitors for Windows. Being an Open source OS, it comes in different variants usually referred as distributions which are based on Linux kernel. Due to these variations we find certain differences in their functionalities. But more-or-less, there aren’t much differences in the commands and few of the errors that are encountered.

Linux Distros

“Command not found” Error in Linux

This is one of the most common errors that a server administrator would usually encounter while working on a Linux server. There may be two reasons responsible for giving such an error, (a) it is probably because Linux looked for a command everywhere it is aware of but doesn’t find a program with that name, and (b) it may be due to a misspelled command name (may be a typo) or the command hasn’t been installed on the Linux server.

Solution to Command not found in Linux

(a) Making sure that the command includes the correct path

(b) You must be sure about the command you type, misspells aren’t entertained by Linux. The acceptable commands are case sensitive and free of spelling mistakes.

“Permission denied” error in Linux

Administrators of Linux can allocate permissions to every user. Hence, it depends on these permissions whether a particular user would be capable of accessing directories or files. Whenever a user tries to access something that the out of his/er scope of permissions, they would usually get an error as “Permission denied”.

It may so happen that, despite you being logged in as root encounter such an error, you must check the file, there are wide possibilities of it having zero permissions. You can amend it using the chmod command.

“No route to host” error in Linux

Such an error is shown due to a networking conflicts or some sort of problem with network configuration. It indicates that the user isn’t able to connect with the host web server (generally via SSH).

Solution to “No route to host” error in Linux

(a) Try running a traceroute to track the issue.

(b) Check whether the firewall is blocking the access. iptables is the firewall used for Linux.

Try the below command to check what iptables rules have been setup:

# /sbin/iptables -L -n

As a temporary action, you can clear all iptables settings to troubleshoot the issue.

“Connection refused” error in Linux

This error may be shown either because the server is down ie. do not have the protocol (like the SSH) which you are trying to use or the connection is blocked on the particular port.

For example : Incase you encounter an error that says “ftp Connection refused” while trying to use an FTP client, the following procedure can be followed to resolve the issue :

You must first of all ensure that the ftp server installed and the services are functional as per expectations.

Incase you have Debian installed, use the dpkg command for verifying the installation of ftp server

$ dpkg -l | grep -i “ftp” Output:

ii ftpd 0.17-21 FTP server

OR use following command:

$ dpkg -l | grep -i ftp

For Red Hat/Novell Suse/Fedora Linux use rpm command:

# rpm -qa | grep -i “*ftp*”

If the ftp package is installed over the server, you would receive an output. Whereas if it isn’t, you would either get a notification or no output would be given. In that case you are required to install the FTP server.

782x50 5

Related Posts:

  • No Related Posts
« Previous entries Next Page » Next Page »