FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Quick question and very basic for you guys. Im a Debain fan but im helping a friend install a Fedora 16 on his laptop. Say if i want to turn off ssh, i normally just go /etc/init.d then chmod -x ssh. But how do i do that from the command line on a fedora system ?
Basic, i've read something about systemctl :S, but would prefer doing chmod -x, if possible in a Fedora environment.
Yep, standard on Slackware, because the main init script checks if they are set to executable and only runs them in that case. But not the correct way on Debian.
that sounds horrible. Wonderfully simple, sure, but that doesn't make it good. the executable flag means the file is execut**ABLE**, not that it should be executed. That's a hack.
that sounds horrible. Wonderfully simple, sure, but that doesn't make it good. the executable flag means the file is execut**ABLE**, not that it should be executed. That's a hack.
It's not "horrible": it's the BSD Init-Style!
You have many different init scritpts in the init path and a main script check for the ones with the executable flag and run them.
Utils and scripts like chkconfig, service [name] start/stop/restart, ntsysv were created to make the daemons-services management easier.
Forget everything you know about /etc/init.d. Examine the files in /usr/lib/systemd/system. The *.service files control services. To make one active, create a link in /usr/lib/systemd/system/multi-user.target.wants; delete the link to disable a service. Suffering from congenital indolence, as I oftentimes do, I use "systemctl" to do all that.
> systemctl status sshd.service
sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
Active: active (running) since Tue, 31 Jul 2012 06:58:26 -0700; 6s ago
Process: 7905 ExecStartPre=/usr/sbin/sshd-keygen (code=exited, status=0/SUCCESS)
Main PID: 7910 (sshd)
CGroup: name=systemd:/system/sshd.service
└ 7910 /usr/sbin/sshd -D
[now the sshd service will no longer start - reverse the process, enable and start, if you want to run sshd again]
> systemctl --help
> man systemctl
IMHO, systemd is a lot easier to deal with than all of those /etc/init.d or /etc/rc.d files. My /etc/init.d directory is empty. (The *.wants directories coorespond to different run-levels.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.