Intelenet Global Services Linux Interview Questions Answers

How To Switch To A Previously Used Directory?

cd -

What Are The Process States In Linux?

Process states in Linux
Running: Process is either running or ready to run.

Interruptible: a Blocked state of a process and waiting for an event or signal from another process.

Uninterruptible:- a blocked state. Process waits for a hardware condition and cannot handle any signal.

Stopped: Process is stopped or halted and can be restarted by some other process.

Zombie: process terminated, but information is still there in the process table.

What Is A Zombie?

Zombie is a process state when the child dies before the parent process. In this case the structural information of the process is still in the process table. Since this process is not alive, it cannot react to signals. Zombie state can finish when the parent dies. All resources of the zombie state process are cleared by the kernel.

Explain Each System Calls Used For Process Management In Linux.

System calls used for Process management
Fork () :- Used to create a new process
Exec() :- Execute a new program
Wait():- wait until the process finishes execution
Exit():- Exit from the process
Getpid():- get the unique process id of the process
Getppid():- get the parent process unique id
Nice():- to bias the existing property of process

How Do You List Files In A Directory?

ls - list directory contents
ls -l (-l use a long listing format)

How Do You List All Files In A Directory, Including The Hidden Files?

ls -a (-a, do not hide entries starting with .)

How Do You Find Out All Processes That Are Currently Running?

ps -f (-f does full-format listing.)

How Do You Find Out The Processes That Are Currently Running Or A Particular User?

ps -au Myname (-u by effective user ID (supports names)) (a - all users)
Intelenet Global Services Most Frequently Asked Latest Linux Interview Questions Answers
Intelenet Global Services Most Frequently Asked Latest Linux Interview Questions Answers

How Do You Kill A Process?

kill -9 8 (process_id 8) or kill -9 %7 (job number 7)
kill -9 -1 (Kill all processes you can kill.)
killall - kill processes by name most (useful - killall java)

What Would You Use To Edit Contents Of The File?

vi screen editor or jedit, nedit or ex line editor

What Would You Use To View Contents Of A Large Error Log File?

tail -10 file_name ( last 10 rows)

How Do You Log In To A Remote Unix Box?

Using telnet server_name or ssh -l ( ssh - OpenSSH SSH client (remote login program))

How Do You Get Help On A Unix Terminal?

man command_name
info command_name (more information)

How Do You List Contents Of A Directory Including All Of Its Subdirectories, Providing Full Details And Sorted By Modification Time?

ls -lac
-a all entries
-c by time

What Is A Filesystem?

Sum of all directories called file system.
A file system is the primary means of file storage in UNIX. File systems are made of inodes and superblocks.

How Do You Get Its Usage (a Filesystem)?

By storing and manipulate files.

How Do You Check For Processes Started By User 'pat'?

ps -fu pat (-f -full_format u -user_name )

Post a Comment

Previous Post Next Post