“Linux: The one weapon in your arsenal”
Linux servers are widely used today and considered amongst the most popular due to their stability, security, and flexibility, which outstrip standard Windows servers. Another major benefit of using Linux over closed-source software like Windows is that the former is fully open-source.
Before I present to you with a cool Linux command, let me tell you few reasons why you should learn Linux:
1.Maximum IT infrastructure is Linux base
W3Techs estimates that 37.6 percent of websites use some version of Linux for their server OS, compared to the 20.3 percent running Windows, as of June 2022.
2. Learn deeply about OSes
The source code to the kernel and other utilities is available for anyone to look at. This is why university computer science departments have educated their students on Unix-like operating systems for decades.
3. Network & security
Linux distributions also come with many networking utilities that let you test a network like ping, tracepath, or ip, and you can install more networking tools like tcpdump or Nmap using your package manager to examine network traffic.
4. Programming tools
The biggest reason is that the tools you need to build programs, such as editors, compilers, debuggers, IDEs, and interpreters either come with Linux distros for free or can be downloaded through a package manager.
For more checkout this link:
https://www.makeuseof.com/why-learn-linux-on-windows.../
Today we are going to Learn about the ‘systemctl’ command. It’s a very powerful command to handle the services and daemon of the Linux Machine and server. It comes with a long list of options for different functionality, the most common of which are starting, stopping, restarting, or reloading a service or daemon. Services like- sshd, xrdp, syslog, sendmail are very important that they should be up and running all time in a Linux server. As a system administrator you should be familiar with this command:
Step-1
Open the terminal of your Linux machine and check if systemd package is installed in your machine by typing:
rpm -qa | grep systemd
(rpm defines packages that are installed and ‘|’ the pipping sign defines that we are pipping the output of ps command to grep, which grab the specific systemd word from vast output )
If not installed then type:
yum install systemd -y
Step-2
To look for a service ,
systemctl status “service name”
systemctl status sshd
(If the service is running it will say active)
Step-3
To stop, reload, restart, enable & disable service:
systemctl stop sshd
(make the service inactive/dead)
systemctl reload sshd
(Keep the service running while reloading new config)
systemctl restart sshd
(Shut down entirely and then start the service)
systemctl enable sshd
(start automatically after every bootup)
systemctl disable sshd
(won’t start automatically after every bootup)
Thanks for taking interest in this post. Hoping to share more useful commands with you. Until then stay safe and keep practicing.
Ji boss.
ReplyDelete