Get the App
SLTechnology News&Howtos  ›  Servers  › 

A complete Collection of commonly used OpenSUSE commands

Shulou Source: shulou.com Published: 2022-06-01 14:13:32 10月03日 Update

This article introduces the relevant knowledge of "OpenSUSE Common Command Collection". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Edit the / etc/inittab file using vi and change the initdefault in it from 5 to 3 to enter text mode

The Opensuse command configures dual IP

/ etc/sysconfig/network # vi ifcfg-eth0

Example:

IPADDR='221.234.43.254'

NETMASK=''255.255.255.0'

IPADDR_0='58.19.87.254'

NETMASK_0=''255.255.255.0'

DNS modification / etc/resolv.conf

Or you can set it with a script

#! / bin/bash

Route add default gw "202.112.13.X" dev eth0

# # Opensuse command to view the running status of the service at each level

Chkconfig-list

Httpd 0: off 1: close 2: close 3: close 4: close 5: enable 6: close

Bluetooth 0: close 1: close 2: close 3: close 4: close 5: close 6: close

# stop HTTPD service

[root@zhangxx etc] # service httpd stop

Stop httpd: [OK]

# start the httpd service

[root@zhangxx etc] # service httpd start

Start httpd: [OK]

# restart HTTD service

[root@zhangxx etc] # service httpd restart

Stop httpd: [OK]

Start httpd: [OK]

# Let httpd stop at the run level when the machine starts

[root@zhangxx etc] # chkconfig-- level 345 httpd off

[root@zhangxx etc] # chkconfig-- list | grep httpd

Httpd 0: close 1: close 2: close 3: close 4: close 5: close 6: close

# Let httpd start at the run level when the machine starts

[root@zhangxx etc] # chkconfig-- level 345 httpd on

[root@zhangxx etc] # chkconfig-- list | grep httpd

Httpd 0: off 1: close 2: close 3: enable 4: enable 5: enable 6: close

[root@zhangxx etc] #

LinuxOpensuse command to view process information

There are a lot of commands to view the process, and I just listed a few of the ones I used most.

Netstat-tln / / View service listening port

Netstat / / View the process number

Ps-aux / / View the process number

Ps-aux | more / / View all

Ps-ef | grep mysql / / View the process of mysql

Kill-9 3306 / / forcibly kill process number 3306

Opensuse Command Firewall Settings

Set up the firewall: yast (setup)

View firewall settings: iptables-L

Turn off the firewall: iptables-F

Red Hat linux as 4 modified / etc/sysconfig/iptables

Add-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 80-j ACCEPT

Indicates that access to port 80 is allowed

For the configuration to take effect, you can restart the computer, or allow the following two commands:

# service iptables stop

# service iptables start

This is the end of the content of "OpenSUSE Common Command Collection". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Commands processes services firewalls fireproofing common use level run Daquan content time more machines knowledge ports configuration practical successful learning next two Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology Shulou Tech Info Linux Microsoft