Unix and AIX System Administration
Test your knowledge of Unix/Linux shell scripting, AIX system administration, command-line operations, and system configuration tasks.
Questions
What is the command vim for?
- A shell
- An editor
- System Manager
- None of these
What is the importance of +x rights given to a directory?
- The +x right is meaningless for directory
- To give permission to other users
- To move into that directory
- None of these
What is the command to display all the environment variables?
- environ
- setall
- env
- None of these
I have a script which will prompt me to enter a password. But I want that the password should not be displayed when I enter the password. How do I achieve this?
- stty -echo
- set noecho
- stop echo
- None of these
What is the command to check all the recent logins with IP address on my AIX server?
- last
- logins
- recentlogin
- None of these
What is the output of the following command? $ awk '{print "'''"}' /etc/passwd|head -1
- a single quote
- a double quote
- syntax error
- None of these
What will happen if I press v after firing the following command?
- Show verbose messages
- Enter VI editor
- Show the version of more command
- None of these
When a new user is created on AIX server, the default value of PATH variable is set from which configuration file?
- /etc/environment
- /etc/profile
- /etc/defaults
- None of these
What is the command to find the maintenance level of AIX 5.3 and above?
- oslevel -r
- maintenancelevel
- osversion
- uname -a
A VG has PP size of 1GB. Which of the following is true?
- The maximum size of any filesystem created in that VG can be of 1GB
- The minimum size of any filesystem created in that VG can be of 1GB
- PP size of 1GB is not possible.
- None of these
What is prtconf in AIX?
- A command to gather system configuration.
- A command to monitor performance.
- Not a valid AIX command
- None of these
How can I disable ftp on my AIX server?
- Hash the line for ftp in /etc/inetd.conf and refresh the inetd daemon.
- Execute the coommand: # service ftpd stop
- Execute the command:# stopsrc -s ftpd
- None of these
What does lspv do?
- List all physical volumes
- List all physical partitions
- List all logical partitions
- List PP size
What is the importance of environment variable PS2?
- Its gets displayed when a command continues to next line.
- It is reserved for root user
- It is used for defining the default character used to commenting a line for a particular shell.
- None of these
The /etc/passwd file does not have write permission for others and group. Still the non root users when use the command 'passwd' are actually updating the /etc/passwd file . How does unix allow this?
- Because of the principle of SUID
- Because the passwd command lies in /usr/bin
- /etc/passwd is a special file and so it is allowed
- None of these
What will happen if I execute a shell script with -x options
- Will only show a preview of the execution and will not actually execute the script
- Show verbose messages of the execution and helps in debugging
- This is called safe-execution.
- None of these
Can I change hostname of my AIX server without reboot?
- Yes, use smitty hostname and reboot is not required
- No, We have to change and to make it permanent we have to reboot the server
- Depends on the runlevel
- None of these
What wil be the output of this command?$ for i in 1 2 3;do echo "$i\c";done; Tell without trying on a server.
- 1c2c3c
- 123
- 1\c2\c3\c
- None of these
I am in a directory /tmp/test. $ pwd /tmp/test Now I deleted this directory from another session and fired the command pwd on the previous session. What will be the output of the pwd command?
- /tmp/test
- Directory does not exist
- /tmp
- None of these
$ i=1 $ j=A $ A1=hello These 3 variables are defined. Which of the following commands will display hello?
- eval echo ${j}${i}
- eval echo $${j}${i}
- eval echo \$${j}${i}
- None of these