
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,689 Views
Red Hat Linux Interview Series 14
Q.) How will you reboot a linux server when the “reboot” command or “shutdown” command is not working ?
Q.) Explain the command :
date;ps -ef | tail -n +2 | awk '{print $1}'| sort | uniq | wc -l >> file.log
Q.) SCP file transfer is really slow - what could be the reasons ( assume that network is sufficiently fast ). What alternative will you choose in its place and why ?
I'll be posting a series of Linux-related questions covering various skill levels. Feel free to share your insights and expertise. Your contributions will benefit learners at all stages, from those in current roles to those preparing for Linux interviews.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,377 Views
On that first question, is this too simple: # systemctl reboot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,369 Views


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,337 Views
Well, here's a little something that I used to demonstrate quite frequently:
# init 6
Seems like it's been years since I've touched it, but I demonstrated it so much
when I did touch it, I could never forget it. Anyway, l await your verdict

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,299 Views
@Trevor init 6, reboot, and systemctl reboot should all behave the same as init and reboot are symbolic links to systemd/systemctl. This means all three commands are calling systemd/systemctl on rhel7+ systems. Now, if the binary is called "init" and it is not the first PID in the system , then for SysV compatibility, it will call telinit and see this :
So, init 6 instructs the system's initialization process to perform a graceful shutdown. It sequentially stops all running processes and daemons according to the order specified in the system's initialization configuration files. Once all processes are terminated, the system is rebooted using the shutdown -r now command.
Hence given the scenario, this is also not working - now the original question has become Thanos and is telling : "You should have gone for the head" LOL!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,289 Views
Question #1
What to you mean by "not working", is it hanging, the command execute but there no action?
"systemctl reboot -ff" could be an option?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,269 Views
Reboot binary is not working not even with systemctl too ( this is the scenario here )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,253 Views
For rebooting question, this might work?
echo b > /proc/sysrq-trigger

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,245 Views
Bingo! Magic system request key!
but it is either not enabled by default or always enabled via a kernel boot parameter "sysrq_always_enabled=1".
You can enable it via /proc/sys/kernel/sysrq though however the above kernel boot parameter overrides the proc sysrq boolean.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,136 Views
did you try to kill pid 0