xugaoxiang | 迷途小书童

Linux common commands-56: unzip

The unzip command is an unzip tool for files in .zip format. Syntax format: unzip [parameter] [file] Common parameters: # 解压到当前目录unzip data.zip # 解压到文件夹test unzip data.zip -d test This article is reprinted from https://xugaoxiang.com/2022/06/16/linux-cmds-56-unzip/ This site is for inclusion only, and the copyright belongs to the original author.

Linux common commands-55: ps

The ps command is used to display the process status of the current system. It is the most basic and very powerful process viewing command. It can be used to determine which processes are running and their running status, whether the process is terminated, whether the process is dead, which processes are taking up too …

Linux common commands-55: ps Read More »

Linux common commands-54: nohup

The nohup command can run the program in a way that ignores the hanging signal. The output information of the program will not be displayed to the terminal, but redirected to the nohup.out file, which is usually called running in the background. This is often done when connecting to a remote server through ssh . …

Linux common commands-54: nohup Read More »

Linux common commands-52: kill

The kill command is used to delete a running process. Syntax format: kill [parameter] [process number] Common parameters: Example # 列出系统支持的信号,kill命令默认使用的信号是15 SIGTERM kill -l # 删除进程,我们需要知道进程的id,也就是pid,pid可以通过ps命令来查看# 杀死进程号是2000的进程,发送信号9 SIGKILL,强制杀死kill -9 2000 This article is reprinted from https://xugaoxiang.com/2022/06/15/linux-cmds-52-kill/ This site is for inclusion only, and the copyright belongs to the original author.

Linux common commands-51: top

The top command is a commonly used performance analysis tool under linux , which can display the resource usage of each process in the system in real time. Syntax format: top [parameter] Common parameters: Example # 显示进程信息top This article is reprinted from https://xugaoxiang.com/2022/06/15/linux-cmds-51-top/ This site is for inclusion only, and the copyright belongs to the …

Linux common commands-51: top Read More »

Linux common commands-50: crontab

The crontab command is used to submit and manage user tasks that need to be executed periodically, similar to the scheduled tasks under windows . Syntax format: crontab [parameter] Common parameters: Example # 显示计划任务crontab -l # 编辑计划任务crontab -e The format of the scheduled task is minute hour day month week command Respectively: time-sharing sun-month-week commands …

Linux common commands-50: crontab Read More »

Linux common commands-49: clear

clear command is used to clear the screen. Essentially, the terminal display page is turned back one page, and if you scroll up the screen, you can still see the previous operation. Syntax format: clear [parameter] Example # 清屏clear This article is reprinted from https://xugaoxiang.com/2022/06/14/linux-cmds-49-clear/ This site is for inclusion only, and the copyright belongs …

Linux common commands-49: clear Read More »

Linux common commands-48: ufw

ufw program is used to manage firewalls. Compared with iptables , it is easier to use. By default, sudo apt install ufw needs to be manually installed. Syntax format: ufw [parameter] Common parameters: Example # 启动ufw enable # 关闭ufw disable # 重启ufw reload # 显示防火墙状态及规则ufw status # 重置配置ufw reset # 允许外部访问80端口ufw allow 80 # 禁止访问80端口ufw …

Linux common commands-48: ufw Read More »

Linux common commands-47: source

The source command is usually used to execute the initialization file that has just been modified to take effect immediately, such as environment variables. Syntax format: source [file] Example # 很多时候,我们安装过一些基础软件,会设置一些环境变量,像PATH,通常是编辑~/.bashrc,想让变量即刻生效,就可以使用source source ~/.bashrc This article is reprinted from https://xugaoxiang.com/2022/06/14/linux-cmds-47-source/ This site is for inclusion only, and the copyright belongs to the original author.

Linux common commands-46: chown

The chown command is used to change the user and user group to which a file or folder belongs. Only super administrators have permission to execute it. Syntax format: chown [parameter] Common parameters: Example # 将test.py文件的用户组和用户都改为xugaoxiang,冒号前的是用户,冒号后的是用户组,很多时候它们的名称是一样的chown xugaoxiang:xugaoxiang test.py # 递归修改文件夹chown -R root:root test This article is reprinted from https://xugaoxiang.com/2022/06/14/linux-cmds-46-chown/ This site is for inclusion only, …

Linux common commands-46: chown Read More »

Linux common commands-45: chmod

The chmod command is used to change the permissions of a file or directory. Only the owner of the file and the super user can execute this command. There are two setting modes, one is to use permission letters and operators; the other is to use numbers. Syntax format: chmod [parameter] [file] Common parameters: Example …

Linux common commands-45: chmod Read More »

Linux common commands-44: userdel

The userdel command is used to delete the specified user and files related to the user. At the same time, the system user account files /etc/passwd , /etc/shadow and /etc/group files are also modified. Syntax format: userdel [parameter] [username] Common parameters: Example # 删除账号xugaoxiang userdel xugaoxiang # 删除用户,同时将其家目录一起删除,/home/xugaoxiang userdel -r xugaoxiang # 强制删除用户userdel -f xugaoxiang …

Linux common commands-44: userdel Read More »