Get the App
SLTechnology News&Howtos  ›  Servers  › 

Share common scripts and commands in linux

Shulou Source: shulou.com Published: 2022-06-01 12:25:50 10月01日 Update

This article mainly introduces "linux commonly used scripts and command sharing". In daily operation, I believe many people have doubts about linux common scripts and command sharing. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "linux common scripts and commands sharing". Next, please follow the editor to study!

1. Simply remove the lines of comments

Cat httpd.conf | grep-v ^\ * # > mayuehehe

2. Modify the port of ssh

/ usr/sbin/sshd-p 1433

3. View a user

Id username

4. View environment variables

Set or env

5. Change the yum source

Cd / etc/yum.repos.d

Mv CentOS-Base.repo CentOS-Base.repo.save

Wget http://centos.ustc.edu.cn/CentOS-Base.repo

6. Open the designated port

Iptables-An INPUT-p udp-- dport 58-j ACCEPT

7. Test the speed of the hard disk

Hdparm-Tt / dev/sda

8. Time synchronization

Ntpdate-s time.nist.gov

Hwclock-systohc

At this point, the study on "sharing common scripts and commands in linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Commands frequently used scripts learning more ports help utility next variables articles methods time comments environment theory users knowledge hard drives articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux MySQL Xiaomi Shulou Tech Info MariaDB