Posts

Showing posts from November, 2022

iptable防火墙设置

  sudo cp /etc/iptables/rules.v4 /etc/iptables/rules.v4.bak && sudo truncate -s 0 /etc/iptables/rules.v4

htop显示系统运行资源

 >sudo apt install htop 安装后执行htop就可以看到状态 ctrl+c 退出 htop 另外还有一个htop的简化版就是top top无需安装,直接可以运行。

修改系统时区

Image
  How To Set or Change Timezone on Ubuntu 20.04 https://linuxize.com/post/how-to-set-or-change-timezone-on-ubuntu-20-04/  Using the correct timezone is essential for many systems related tasks and processes. For example, the cron daemon uses the system’s timezone for executing cron jobs, and the timestamps in the log files are based on the same system’s timezone. On Ubuntu, the system’s timezone is set during the install, but it can be easily changed at a later time. This article describes how to set or change the timezone on Ubuntu 20.04 using the command line, or through the GUI. Prerequisites Only the root or user with sudo privileges can set or change the system’s timezone. Checking the Current Timezone timedatectl is a command-line utility that allows you to view and change the system’s time and date. It is available on all modern systemd-based Linux systems, including Ubuntu 20.04. To print the current system’s timezone invoke the timedatectl without any argumen...

SSH from linux

  Connecting to a Linux Instance You connect to a Linux instance using SSH. To connect to a Linux instance from a Unix-style system Use the following command to set the file permissions so that only you can read the file: chmod 400 <private_key_file> <private_key_file> is the full path and name of the file that contains the private key associated with the instance you want to access. Use the following SSH command to access the instance. Note Copy the following example to ensure the correct characters are used. If the wrong character is used in ssh -i , a Could not resolve hostname ...: No such host is known. error might occur. ssh -i <private_key_file> <username> @ <public-ip-address> <private_key_file> is the full path and name of the file that contains the private key associated with the instance you want to access. <username> is the default username for the instance. For Oracle Linux and CentOS images, the defau...