Top 10 Scenario-Based Linux Interview Questions and Answers with Practical - Real Time

  Рет қаралды 103,997

Server Gyan

Server Gyan

4 жыл бұрын

In this video, I am going to explain some important scenario-based interview questions and answers with practical...
Scenario-Based Linux Interview Question for Experienced...
Q-1: A user is not able to ssh to a remote server, what could be the possible cause?
Q-2: User root has created a file /tmp/abc with 700 permission, you want that your lokendra should have full access to file, how will do this?
Q-3: How will you change the default login shell for all upcoming users on Linux?
Q-4: After creating password less ssh access, whenever I try to login to a server it asks me for the password, While I have verified that my public key is placed on a remote server?
Q-5: How to disable the root account?
Q-6: I have a server where httpd service is running, I want that httpd should be running on cpu core no 2 only.
Q-7: After reboot, I can see a time difference in /var/log/message and os time.
Q-8: I want to restart a service only if the service is already running. If service is in a stopped state, the command should do nothing.
Systemctl try-restart httpd.service
Q-9: What is max filename length allowed in Linux? 255
Q-10: What is drop cache in Linux and how do you clear it?
Please watch the following video for another interview question
• Linux Interview Questi...
In this video, I am going to explain some real-time interview questions and answers for 2-4 years of experience.
Linux Interview Questions and Answers
Q- How will you change the default user id value in Linux?
Q- root# rm -rf /tmp/test gives error operation not permitted. Reason?
Q- /etc/hosts (Which RPM is responsible for creating this file).
Q- What is the difference between RPM and YUM?
Q- What is the difference between Hard and Soft Link?
Q- What is a sticky bit?
Q- How will you check open ports on Linux Server?
Q- How will you check open ports on remote servers (without login)
Q- Your site is throwing 500 error, how will you start troubleshooting?
Q- How will you start troubleshooting if your site is down?
Q- How will you create space on disk if it is showing 100% used?
Q- What is a package of sar command and what does it do?

Пікірлер: 105
@yashkumar0042
@yashkumar0042 4 жыл бұрын
i was searching this type of videos from long time. Finally got it Server Gyan ! Thanks
@sriramketha7662
@sriramketha7662 2 жыл бұрын
Thank you for detail explanation.
@karamjeetdalal3024
@karamjeetdalal3024 3 жыл бұрын
Thanks for your outstanding contribution in terms of sharing knowledge for the welfare of society.
@ServerGyan
@ServerGyan 3 жыл бұрын
Thank you dear for your words Happy learning
@yashthaker6726
@yashthaker6726 4 жыл бұрын
Always Informative. Thankyou sir
@Ray_TambaBudol_Marcos
@Ray_TambaBudol_Marcos Жыл бұрын
You earn a sub brother, I love Linux your videos helps me a lot.
@Ather178
@Ather178 3 жыл бұрын
Beautiful. Thank you for sharing this! Much Appreciated!
@emmittkyrie2965
@emmittkyrie2965 2 жыл бұрын
you prolly dont give a damn but does someone know a method to get back into an Instagram account? I somehow lost the login password. I love any assistance you can offer me
@westleytitan4640
@westleytitan4640 2 жыл бұрын
@Emmitt Kyrie Instablaster =)
@emmittkyrie2965
@emmittkyrie2965 2 жыл бұрын
@Westley Titan thanks so much for your reply. I got to the site thru google and im in the hacking process atm. I see it takes quite some time so I will get back to you later with my results.
@emmittkyrie2965
@emmittkyrie2965 2 жыл бұрын
@Westley Titan It worked and I now got access to my account again. I'm so happy! Thanks so much you saved my account :D
@westleytitan4640
@westleytitan4640 2 жыл бұрын
@Emmitt Kyrie glad I could help :)
@leelakrishnan2020
@leelakrishnan2020 4 жыл бұрын
Hi Lokendra, Thanks for your outstanding contribution in terms of sharing knowledge to the entire society,I'm requesting you to share some videos related with Magento,Apache & Nginx administration,Nagios & Zabbix network monitoring,solr search,God bless you for all your continuous efforts.
@ServerGyan
@ServerGyan 4 жыл бұрын
Thank you dear, I will surely try for topic as per your suggestions
@grvkmr1
@grvkmr1 4 жыл бұрын
fascinated session
@saumiyasomanathan5840
@saumiyasomanathan5840 7 ай бұрын
This was so interesting. Its very boring to always watch something in a traditional way of basics to advance. This was nice with miced up all level of questions and with scenario based .❤plus, this is so deep.So many new things fr me.
@ServerGyan
@ServerGyan 6 ай бұрын
Glad you enjoyed it!
@Mhmdd786
@Mhmdd786 4 жыл бұрын
Thankyou sir...
@saimurthy3680
@saimurthy3680 2 жыл бұрын
Good explanation👍
@harispalegar6806
@harispalegar6806 2 жыл бұрын
Thanks for the sharing
@ServerGyan
@ServerGyan 2 жыл бұрын
Happy learning dear
@prabhakarant542
@prabhakarant542 4 жыл бұрын
Waiting
@sharma2029
@sharma2029 4 жыл бұрын
Thank you 😇... Like this make video of aws
@ServerGyan
@ServerGyan 4 жыл бұрын
Sure dear...
@naveenkadari1698
@naveenkadari1698 2 жыл бұрын
It was nice and please add more realtime scenario in linux
@ServerGyan
@ServerGyan 2 жыл бұрын
Sure dear, I will keep on adding new videos Thanks for suggestion Happy learning
@abhinawsingh1
@abhinawsingh1 11 ай бұрын
Thanks
@SilentSolution
@SilentSolution 2 жыл бұрын
Thanks for your information sir
@ServerGyan
@ServerGyan 2 жыл бұрын
Thanks dear Happy learning
@SandeepSingh-hn6it
@SandeepSingh-hn6it 2 жыл бұрын
Beautiful. Thank you for sharing this! Much Appreciated! I have some query could you help us. 1. what is the command of clear the disk space in Linux/CentOs 2.if CPU goes above of set threshold, what could be the reason and what should be the troubleshoot action ? 3.How to check Disk read and write bytes what is the command ?
@SandeepSingh-hn6it
@SandeepSingh-hn6it 2 жыл бұрын
Sir Dil to mere hai.. app ne Comment ka Jabab nahi diya gol kar diya..hahaa Can you please
@ServerGyan
@ServerGyan 2 жыл бұрын
Hi You need to analyse data which can be deleted on server, then you can remove unwanted data. Use du -sh command do analyse You top command to check cpu usage SAR, or iostat, iotop or dstat command to check disk io
@SandeepSingh-hn6it
@SandeepSingh-hn6it 2 жыл бұрын
@@ServerGyan Great Sir. Thanks, please make shell scripting for this is very imp for who will be try to Cloud as my undersetting.
@sriramketha7662
@sriramketha7662 2 жыл бұрын
I have a doubt, i shared a file and in a group vfx, suppose 50 users added, i want only 4 members specially in a group can have access to delete or edit that file?
@ServerGyan
@ServerGyan 2 жыл бұрын
Sure, you can set ACL for those users on files
@santanushan
@santanushan 4 жыл бұрын
Hi Sir, can you please make a video regarding converting a boot volume into LVM type
@ServerGyan
@ServerGyan 4 жыл бұрын
Dear Santanu, If it's created on aws, by default it's lvm backed up.
@saumiyasomanathan5840
@saumiyasomanathan5840 6 ай бұрын
Isn't that listening port and ipv4 ipv6 are in comment form .. are they still active with that hash ( comment) ? A genuine doubt , sir since I am a student. My question is about first question sshd file.
@simplestuffsbyash4721
@simplestuffsbyash4721 3 жыл бұрын
Hi ServerGyan, Could you please tell me the answer for the below question: 1. Write one "find" command sequence that search a file name "debug.log" under /var/log/debug and replace string "WARN" to "ERROR" 2. I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
@gauravmaurya2030
@gauravmaurya2030 2 жыл бұрын
Set SUID bit on the user mode to accomplish the task.
@nandhinisakrapani3364
@nandhinisakrapani3364 Жыл бұрын
Use SUID , place value 4 before in the unmask value
@ashishgupta3788
@ashishgupta3788 Жыл бұрын
2. Sticky bit -----> chmod o+t filename or chmod 1777 filename.
@abhinavpaul5960
@abhinavpaul5960 4 жыл бұрын
can you please explain in short how load average is calculated in linux ?
@moizshaikh4480
@moizshaikh4480 Жыл бұрын
Run Que length is formula of calculate load average
@moizshaikh4480
@moizshaikh4480 Жыл бұрын
Load average is Cumilative and Combined load of system. If u run command load average then u will get 3 diffrent load averages.1st one is Load average of last 1 min, 2nd is Load average of last 5 mins and 3rd one is load average of last 15 mins load of your system. I hope this was helpful.
@akgollapalli209
@akgollapalli209 4 жыл бұрын
Can you explain how to calculate load average? Plz
@moizshaikh4480
@moizshaikh4480 Жыл бұрын
Run que lengh is formula of Calculate load average. In short Load average= Running Processes + Runable processes
@moizshaikh4480
@moizshaikh4480 Жыл бұрын
Hope u have got ur answer
@siyaramkumar9912
@siyaramkumar9912 3 жыл бұрын
1. How can i check which process running on particular cpu. 2.in LVM my disk is corrupt how to find which disk is corrupt and hiw to recover that data. How to replace it . 3. What to do when try to up my system but its doesn't work, tell how to troubleshoot without my system running. Pls reply sir. If you have some real time interview questions than pls share with me. Because due to pandemic i lost my job so i really need these thing.😢😢
@ServerGyan
@ServerGyan 3 жыл бұрын
Okay I will share answers
@Mawkisht1
@Mawkisht1 4 жыл бұрын
gyanfull !
@ServerGyan
@ServerGyan 4 жыл бұрын
Okay dear, thank you, happy learning
@ramireddypoli8873
@ramireddypoli8873 2 жыл бұрын
Accidently run chmod -R / abc:abc what will happen, what will the impact in o.s
@ServerGyan
@ServerGyan 2 жыл бұрын
Multiple services will stop working
@kiranmahi143
@kiranmahi143 Жыл бұрын
4years experience azuredevops scenario Based interview Question and Answer tell me bro 🙏🏻plz
@shubhampansare-tm1bf
@shubhampansare-tm1bf Жыл бұрын
i got 3 questios from this vid. in interview
@ServerGyan
@ServerGyan Жыл бұрын
Wow, 😃 Happy learning
@chaitanyakumar8213
@chaitanyakumar8213 3 жыл бұрын
Bro I have a question, I have 100MB files in my Linux server but I don't know in which directories are present. So I have to find all 100MB files in all directories and remove them. How we can solve this question?
@ServerGyan
@ServerGyan 3 жыл бұрын
Please use find command for the same And use size parameter
@chaitanyakumar8213
@chaitanyakumar8213 3 жыл бұрын
@@ServerGyan can you provide the command for the same?
@ankitapalekar3566
@ankitapalekar3566 Жыл бұрын
@@chaitanyakumar8213 Find / -type f -size 100M -exec rm -rf {}\;
@sanjupdsah
@sanjupdsah 3 жыл бұрын
ssh -add ??
@basavarajn995
@basavarajn995 Жыл бұрын
I am not able to login server I am getting sudo file error
@rahulmahure3
@rahulmahure3 4 жыл бұрын
Hello Sir, I have few questions which was asked me recently 1. What details you give to Storage Team to Extend the Disk 2. What command you used to see which LUN is Assign with Which Disk 3. If 10GB is added by Storage team but you are not able to get that 10GB then how we troubleshoot it
@rejibs
@rejibs 4 жыл бұрын
Have faced same questions..
@prashantjaiswal1
@prashantjaiswal1 4 жыл бұрын
@Rahul: 1: we need to provide the WWN number to the storage team and they can assign a new LUN/storage based on the WWN number. 2:you have to first scan the newly assigned luns using the echo command echo "- - -" > /sys/class/scsi_host/host*/scan. then you can use multipath -ll command or you can use ls -la /dev/disk/by-id/. it will show the luns assigned. 3: as earlier said, you have to scan the disk and it will show newly added disks. Hope this answers your question
@rahulmahure3
@rahulmahure3 4 жыл бұрын
@@prashantjaiswal1 Thank You Prashant We can also scan the newly assigned luns by using sg3 package but Need to install sg3 package on server and then just run the below Command:- # rescan-scsi-bus.sh OR # /usr/bin/rescan-scsi-bus.sh
@ServerGyan
@ServerGyan 4 жыл бұрын
Thank you dear, I missed it somehow
@DesisettyRameshRam
@DesisettyRameshRam 2 жыл бұрын
Hi brother How to allocate multiple particians Like 10 particians Can you explain one time please
@ServerGyan
@ServerGyan 2 жыл бұрын
Can you please explain your question a little more
@DesisettyRameshRam
@DesisettyRameshRam 2 жыл бұрын
Multiful pathing how to create. Is there any short cut method is there
@ServerGyan
@ServerGyan 2 жыл бұрын
There is no shortcut method for configuring it
@amrutpatane7487
@amrutpatane7487 4 жыл бұрын
Hi Sir, Please bmake font bigger. Not able to see properly
@amrutpatane7487
@amrutpatane7487 4 жыл бұрын
* make
@ServerGyan
@ServerGyan 4 жыл бұрын
Okay dear, will take care next time
@visheshsingh3235
@visheshsingh3235 3 жыл бұрын
hi sir ! how we know that particular service is using some specific CPU . is there any command or we have to check CPUAffinity ?
@ServerGyan
@ServerGyan 3 жыл бұрын
ps -o psr 27395. You can check with following command
@visheshsingh3235
@visheshsingh3235 3 жыл бұрын
@@ServerGyan thank you sir
@visheshsingh3235
@visheshsingh3235 3 жыл бұрын
@@ServerGyan your videos are very good . i had crack my Ericsson interview with the help of your tutorials Thank you
@ServerGyan
@ServerGyan 3 жыл бұрын
Thank you dear and congratulations Happy learning
@nitinrawat9477
@nitinrawat9477 4 жыл бұрын
I have been asking u this same question for 3 months.. what's the difference between permissions given by chmod and suid ....but despite saying you would include it in ur coming videos...u never answered it or included it in any of ur videos......... also tell me what will happen if we don't include #!/bin/bash in our script.....will it run or not...or will generate error.... also difference between authorized_keys and known_hosts files
@ServerGyan
@ServerGyan 4 жыл бұрын
Dear Nitin, Sorry for the same, Let's start with chmod and suid chmod command is used to assign permission to a file or directory. It can assign permission to user, group or others only. but if you need to assign/revoke permission for a single user then you need to use setfacl command. SUID is used to assign special permission on any executable file, such as PING command. if you run ping command as non root user, it gets executed as root because of suid. if you remove suid, you won't be able to run ping command. In short, if you want a file to be executed as of its owner is executing it, we need to use SUID. Now let's talk about #!/bin/bash If you add this in script then you don't need to specify script file name ending with file.sh, your script will run without .sh ececution. but if you don't write #!/bin/bash then you need to mention. I hope this answers your question.
@nitinrawat9477
@nitinrawat9477 4 жыл бұрын
@@ServerGyan u left the 3rd question....
@prashantjaiswal1
@prashantjaiswal1 4 жыл бұрын
@@@nitinrawat9477: when we try to connect any client through ssh, it sends its private key to client-server and it gets copied to the destination server and later it is used to authenticate that client knows the server. If your private key gets changed, your connection will get failed. This private key file resides in client known_hosts file and it used to identify the server identity through saved private key. known_hosts resides on the client."authorized_keys" resides on the server
@maimoonamirza5626
@maimoonamirza5626 3 жыл бұрын
@@nitinrawat9477 are you paying him tuition fees. Have some courtesy and respect. U are asking him questions as if he owes something to u
@nitinrawat9477
@nitinrawat9477 3 жыл бұрын
@@maimoonamirza5626 dear friend it's not about money it's about courtesy and loyalty to his loyal subscribe.... Please first go and check how many times I have asked him those questions.... He also promised me to answer them in his next video but he didn't.... I waited to 2 months but when he didn't, I have just commented to make him remind of his promise.... If his subscriber can't even ask questions to him what's the point then..... I have not used bad or improper word for him..... Please have some common sense before judging someone....
@ManjuHS9841
@ManjuHS9841 3 жыл бұрын
How to contact you ?
@ServerGyan
@ServerGyan 3 жыл бұрын
You can connect us at 8882470500
@hamedhamed-ox9ty
@hamedhamed-ox9ty 3 жыл бұрын
iam unable to find httpd.service file
@ServerGyan
@ServerGyan 3 жыл бұрын
How did you install service
@hamedhamed-ox9ty
@hamedhamed-ox9ty 3 жыл бұрын
Yum install httpd*
@ashishgupta3788
@ashishgupta3788 Жыл бұрын
@@hamedhamed-ox9ty did you press "y" after that??
@moinsyed195
@moinsyed195 3 жыл бұрын
please make real time video
@ServerGyan
@ServerGyan 3 жыл бұрын
Sure dear
@yashsinha5669
@yashsinha5669 3 жыл бұрын
Thanks very much for such informative videos sir...
Linux Interview Questions and Answers with Practical - Real Time
18:57
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 78 МЛН
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 6 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 21 МЛН
Realtime Interview Questions asked from 3-5 years of Linux Admins
21:01
Popular Linux Interview Questions for DevOps Interviews
14:20
tutoriaLinux
Рет қаралды 124 М.
Top 10 Linux Job Interview Questions
21:30
Server Gyan
Рет қаралды 27 М.
Level 2 - Linux Interview Questions and Answers | Tech Arkit
26:08