Author: Surendra Anne

Linux Interview Questions:Basic

Basic linux interview questions 1)How do you find out what’s your shell? – echo $SHELL 2)What’s the command to find out today’s date? – date   3)How do you find out the current directory you’re in? – pwd 4)How do you find out your own username? – whoami/who am i 5)How do you send a mail message to somebody? – mail surendra@linuxnix.com -s ‘Your subject’ -c ‘test@gmail.com‘   6)What’s the command to find out users on the system? – who/users 7)How do you remove a file? – rm 8)How do you remove a – rm -rf 9)How do you count words, lines and characters in a file? – wc 10)How do you search for a string inside a given file? – grep string filename   11)How do you search for a string inside a directory? – grep string * 12)How do you search for a string in a directory with the subdirectories recursed? – grep -r string * 13)What are PIDs? – They are process IDs given to processes. A PID can vary from 0 to 65535. 14)How do you list currently running process? – ps 15)How do you stop a process? – kill pid   16)How do you find out about all running processes? – ps -ag 17)How do you stop all the processes, except the shell window? – kill 0 18)How do you fire a process in...

Read More

Solaris routing basics

This my first post on Solaris on my LinuxNIX(NIX is nothing but UNIX all flavors). Creating routes in Solaris: Basic Sun Solaris  routing Add a route to a network#route add net network default-gateway Example          #route add net 5.23.1.0 1.9..9.1 Add a default route.#route add default  default-gateway Example          #route add default 1.9.9.1 Delete a route#route delete net network default-gateway Example           #route delete net 5.23.1.0 1.9.9.1 Look-up and display the route for a destination network:# route get destination-network Example          #route get 5.23.1.0 Get routing reports continuously# route monitor Flushing the route table:# route flush Seeing routing table in sun box #netstat -nr Use the “route add net” command with the -netmask option to make the route command to take the netmask specified on the command line # route add net 192.168.68.0 128.50.1.250 1 -netmask 255.255.255.192 Permanently assigning a routes in sun box/etc/rc2.d/S69inet file can be used for routes to exit’s permanently Example entries in S69inet file /usr/sbin/route add net         1.100.0.0       1.7.16.1     1/usr/sbin/route add net         17.48.30.0      1.7.0.48     1/usr/sbin/route add net         17.48.30.0      1.7.48.1     1 save the file and exit so from next time on words no need to execute the route commands every time after reboot Please visit https://www.linuxnix.com for more linux admin...

Read More

Linux user management – 1

User Management Basics-I For a linux admin, knowledge of user management is must. In this we’ll look at simple user management tasks such as creating users I) Creating a user in linux Syntax:     #useradd username Example:         #useradd phani here we created an user called phani. Before executing this command we should know that useradd is an admin command so only root user can execute this command,So we created user what next? simply logging in ha? if you try to login with “phani” user system will ask for password for that user so without creating a password phani cant login II) Creating user password Syntax: #passwd username Example:         #passwd phani when you enter this command you will be prompted for new password and for re-entring new password, once the password is updated to system we will get conformation saying that,password has been updated sucessfully thats it’s, Creating user in linux is this much easy.. So what next we will see some other commands to know more about user management III)So how to change password ? Syntax #passwd username Example: #passwd phani this is almost same as creating a password, but we have to know one more info suppose you logged in to user “phani” and want to change password for that user you no need to specify the user name just give passwd it will ask...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.