Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
New to linux but sadly a linux server just got dumped on us when we have no experience, so trying to gather experience and get some of the automation back.
One of the services we need to automate the start/stop/restart of is now on linux as a daemon i think it is.
All our sql databases, task schedules and automations are on windows servers so I need to work out a way of sending linux commands from a windows service to stop and start a service.
Is there any way of doing this from windows powershell or command prompt?
Like sending the below commands to the linux server
sudo systemctl stop
sudo systemctl start
I am a complete novice with linux commands so please be kind :)
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have two virtual machines with Debian. One I got from school. The other one I made myself.
The way you restart apache2 on the school machine is service apache2 restart and they way you restart networking is service networking restart.
However, when I tried these commands in the machine I set up myself, I found out that they don't work and that I have to use systemctl apache2 restart for apache2 and systemctl restart networking for networking instead.
My question is why I have two use two different commands to do the same thing on these machines, even tho they are both running Debian.
Thank you in advance.
The answer to your question: On the machine, you set up for yourself, you have a newer distribution of Debian than the one from your school. The service command was replaced with systemctl .
A more detailed answer with differences between these two commands you can find here.
In the older versions, for the same task we used:
/etc/init.d/{service name} {comand}
example:
/etc/init.d/apache2 restart
Then at a later stage, the service command came in.
Now on current distributions, you should use systemctl instead of service, and it is recomended even on distributions what suport both or all three comands (like ubuntu 20.04 for example).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have remote server running under CentOS 7, usually it's enough to operate using SSH CLI - but sometimes I need a graphic access, so I installed Gnome Desktop there too.
But how to stop or start Gnome Desktop ? Especially because gnome-shell eats CPU when I don't need Gnome.
It seems strange but 3 pages of Google search did not help.
I'm afraid there are no a simple solution here like
service gnome stop | start
So thanks in advance for any hint or howto !
But the solution was simple.
First of all - check if you GDM service is running.
service gdm status
If not - start it to make active.
(my case service gdm was loaded but inactive and it causes a confusing)
After that I just stopped gdm service
service gdm stop
and checked any Gnome processes
ps aux | grep gnome
an output is empty, Gnome desktop gone until started again by
service gdm start
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I've spent last few hours looking for a solution for my problem which is:
I have my home server set up next to me with a small monitor attached to it. What i want to do is i want to create an additional user called "monitor" that executes command "nethogs eth1" straight after it has been logged one locally on the machine, and does not allow to turn off the script.
Basically i want nethogs running 24/7 on my monitor, without way to turn it off.
Please help me if you know the solution.
sudo adduser monitor
echo "sudo -u monitor nethogs eth1" >> /etc/rc.local
Each time your machine boots, it will execute nethogs eth1 as user monitor, and only root or monitor itself can stop that command.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a Linux server application that I managed to "deploy" as a daemon that can be started automatically when the machine starts, independently of user sessions..
I wonder if it is possible to tell the system to automatically restart the application when it crashes, like the service manager in Windows..
Thank you in advance.
Give it a look to monit, it monitors any service/daemon. You have to configure Monit in order to know what criteria to use to start/stop or email you in case something wrong/strange is going on.
What you need is a process supervisor, a utility that manages your daemon and decides when to start/stop it among other things.
There are several of these out there such as supervisord, upstart, runit etc. You will have to research them and find one that best suits your needs.
Hope that helps.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am new to the world of Unix and would like to install some type of editor to run Unix ssh commands on my windows PC. If that is not possible then how can i go about practicing Unix commands? I would be making directories and storing data in them if that helps.
From what I am reading you want to practice working in a unix command line on your windows PC. Is this correct?
If so I might recommend you check out cygwin.
ref: http://www.cygwin.com/
cygwin can install on a windows machine and provide you with an emulated linux shell. you can do pretty much anything basic you can do in linux in cygwin.
I would recommend two things which will enable you to use ssh:
1) If you want to keep on using Windows but have a remote machine on which you could login via ssh I recommend PUTTY.
2) You can set up a virtual machine using e.g. VirtualBOX.
I think, running a Linux VM on virtualbox is a better choice. You have a complete system to play with.