How to install extension php?

$ sudo apt-get install extension_name
The above command install the specified extension in unix/linux box.

How to install intl extension php?

$ sudo apt-get install php5-intl

How to install PHP accelerator APC?

sudo apt-get install php-apc

The extension already installed then it will upgrade if any new version released.

If no latest version release after our installation then it show message like below

$ sudo apt-get install php-apc
[sudo] password for sasikala:
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-apc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 404 not upgraded.

How to check particular php extension installed in linux?

This command shows the extension installed or not
$ php --re extensionname

example :
$ php --re intl
Exception: Extension intl does not exist

If exists then display the extension like below with version and its contents

Extension [
extension #46 intl version 1.1.0 ] {

- INI {
Entry [ intl.default_locale ]
Current = ''
Entry [ intl.error_level ]
Current = '0'

- Constants [171] {
Constant [ integer INTL_MAX_LOCALE_LEN ] { 80 }
Constant [ string INTL_ICU_VERSION ] { }

How to find which php is used or where the php located in command line?

$Which php
this command show the path of the php used.

$ which php

How to find which php.ini used in console?

php -i display the phpinfo(). Grep that result and find the php.ini file like below

$ php -i | grep Config
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini

Unix - Questions - Interview / Learning

13. What does chmod 654 stand for.

Ans : _rw_r_xr__

14. Which of following is used for back-up files?

(a) compress (b) Tar (c) make (d) all the above

Ans : b

15. what does find command do ?

Ans : search a file

16. The very first process created by the kernal that runs till the kernal process is haltes is

Ans : init

17. The UNIX shell is....

Ans : forms the interface between the user and the kernal

18. In UNIX a files i-node
Ans : is a data structure that defines all specifications of a file like the file size ,number of lines to a file ,permissions etc.

19. Which of the following is true

a)UNIX is a time sharing multi-user OS
b)UNIX has a device independent file system
c)UNIX is full duplex
d)UNIX has command interpreter
e)All of the above

Ans: e

20. Interprocess communication in UNIX can be achieved using

d)Shared Memory
e)All of the above

Ans : e

21. Which of the following is true about fork()

Ans : causes the creation of a new process ,the CHILD process with a new process ID

22. until who|grep mary
sleep 60
a) is syntactically incorrect
b) waits 60 seconds irrespective of Mary being logged in or not
c) waits until Marry is logged in
d)waits till Mary exited

Ans : c

Unix - Questions - Interview / Learning

1. To display the contents of a executable file the following command can be used

Ans : od

2. Assume the current directory contains 10 files and does'nt contain 'temp'. What will be the output of the follwing commands?

$ls > temp
$wc -l temp

Ans : 10

Syndicate content