Note (2026): The basic bash and Vim tips are still recognizable today. But the Zend Framework context is historical: new Zend Framework releases moved to the Laminas Project, and modern PHP projects usually manage dependencies with Composer.
Convenient Shortcuts
There is a useful thing in *nix systems called command shortcuts, or aliases. Almost everyone has probably thought about this while typing another long path to some command. And everything is actually as simple as can be.
So, to create an alias, you need to enter this command:
alias zf='sudo sh /home/ast/vhosts/ZendFramework/bin/zf.sh'
The best option is to put the necessary aliases into your settings:
gedit ~/.bashrc
Done. Now you can compare the original version of the command with the new one that uses aliases:
sh /home/ast/vhosts/ZendFramework/bin/zf.sh create project Sample
zf create project Sample
The benefit is obvious.
Console Editing
Using SSH is a very convenient way to manage servers remotely: it requires minimal channel bandwidth and has all the power of the *nix console. But while commands are not hard to remember, sometimes you also need to edit some config. Connecting a graphical interface for that is like hunting a fly with a rocket launcher. Fortunately, there is Vim.
Using it is very simple, like an ordinary editor:
vim /etc/php5/apache2/php.ini
I will describe the most basic functionality of this powerful thing, enough for the minimum program: editing configs.
/ lets you enter text for the simplest search. To find the next occurrence of the search string, call the command without a parameter.
i switches the program into editing mode. You can return to viewing mode at any time by pressing ESC.
:w! saves the file with all changes.
:quit exits the program when there are no unsaved changes.