Common Linux commands

This article focuses on my common Linux commands for review

Agent command

Open the Mauritius

cd trojan
./trojan -c config.json
Copy the code

Check whether Trojan starts successfully

ps -ef | grep trojan
Copy the code

Use ProxyChains to delegate

proxychains wget https://www.google.com
# add proxychains to add proxychains
Copy the code

Verify the agent

$curl ip.gs Current IP: 124.xxx.xxx.xxx. China telecom Beijing Beijing $proxychains curl IP. Gs proxychains - 3.1 (http://proxychains.sf.net) | DNS - request | IP. Gs | S - chain | - < > - 127.0.0.1:1080 - < > < > - 4.2.2.2:53 - < > < > -- OK | DNS response | IP. Gs is 45.116.12.10 | S - chain | - < > - 127.0.0.1:1080 - < > < > - 45.116.12.10:80 - < > < > - OK current IP: 106. XXX. XXX. XXX from: the Japanese Tokyo metropolitan Tokyo linode.com kddi.comCopy the code

System switch & update

See Kali Linux Modify Update Sources and update commands for this section

Software installation

Linux apt command

Apt command execution requires super administrator privileges (root)

Apt grammar

  apt [options] [command] [package ...]
Copy the code
  • ** Options: ** Optional options include -h (help), -y (select all “yes” when prompted during installation), -q (do not display the installation process), and so on.
  • **command: ** The operation to be performed.
  • Package: indicates the name of the installation package.

Apt common commands

Command to list all updatable software:
sudo apt update

Upgrade package:
sudo apt upgrade

# list updatable software package and version information:
apt list --upgradeable

# Upgrade package, delete package before upgrade:
sudo apt full-upgrade

Install the specified software command:
sudo apt install <package_name>

# install multiple packages:
sudo apt install <package_1> <package_2> <package_3>

New software command:
sudo apt update <package_name>

# display package details, such as version number, install size, dependencies, etc.
sudo apt show <package_name>

# remove package command:
sudo apt remove <package_name>

Dependencies and library files that are no longer used:
sudo apt autoremove

In addition to software packages and configuration files:
sudo apt purge <package_name>

Select * from software package;
sudo apt search <keyword>

# list all installed packages:
apt list --installed

List all installed package version information:
apt list --all-versions
Copy the code
#Command combination
sudo apt update && sudo apt upgrade -y
#If we want to install a package, but do not upgrade it if the package already exists, use the -- no-upgrade option:
sudo apt install <package_name> --no-upgrade
#If you only want to upgrade and do not install, you can use the --only-upgrade parameter:
sudo apt install mplayer --only-upgrade
#To set the specified version, the syntax is as follows:
sudo apt install <package_name>=<version_number>
#Package_name indicates the package name, and version_number indicates the version number.

#Clean up dependencies and library files that are no longer used:
sudo apt autoremove
Copy the code