Ubuntu common commands

sudo apt-get install software name install software command
sudo nautilus to open the file (with root privileges)
su root switch to "root"
ls List files in the current directory (not including hidden files)
ls -a lists files in the current directory (including hidden files)
ls -l lists the detailed information of the files in the current directory
cd .. Back to the upper level of the current directory
cd-go back to the last directory
cd ~ or cd back to the current user's home directory
mkdir directory name to create a directory
rmdir empty directory name delete an empty directory
rm file name file name delete a file or multiple files
rm -rf non-empty directory name delete everything in a non-empty directory
mv path/file/by/file moves the file under the relative path to the absolute path
mv file name new name renamed in current directory
find path-name "character string" Find files and directories that meet the string matching within the range of path
fdisk -l view system partition information
fdisk fdisk /dev/sdb partitions a new SCSI hard disk
chown chown root /home Change the owner of /home to root user
chgrp chgrp root /home Change the group of /home to the root group
Useradd creates a new user
Groupadd group name to create a new group
Passwd username is the user to create a password
Passwd -d user name delete user password can also log in
Passwd -S username query account password
Usermod -l new user name old user name renamed user
Userdel–r Username deletes all users
tar -c create package -x release package -v show command process -z represents compressed package
tar --cvf benet.tar /home/benet pack the /home/benet directory
tar --zcvf benet.tar.gz /mnt Pack and compress the directory
tar --zxvf benet.tar.gz compressed file decompression recovery
tar --jxvf benet.tar.bz2 unzip
make compile
make install install the compiled source package
reboot Init 6 reboot LINUX system
Halt Init 0 Shutdown --h now Shut down the LINUX system
uname -a View the kernel version
cat /etc/issue view ubuntu version
lsusb view usb device
sudo ethtool eth0 view network card status
cat /proc/cpuinfo view cpu information
lshw View current hardware information
sudo fdisk -l view disk information
df -h View the remaining space of the hard disk
free -m View current memory usage
ps -A to see which processes are currently available
Configure IP: vim /etc/network/interfaces eth0: external eth1: internal DNS (114.114.114.114 8.8.8.8)
DNS:vim /etc/resolv.conf
Restart: /etc/init.d/networking restart
Allow SSH: vi /etc/ssh/sshd-config
Restart SSH: /etc/init.d/ssh restart
System upgrade: sudo apt-get update

Recommended Posts

Ubuntu common commands
2018-06-14Ubuntu common commands
Ubuntu16.04 common command notes
Ubuntu configure network commands
023. Ubuntu common personalized configuration
docker (common commands for mirroring)
Install common software on Ubuntu 16.04
ubuntu builds common development environment
Ubuntu 18.04 disable/enable the touchpad via commands
Summary of Ubuntu commonly used commands
Ubuntu18 super detailed common software installation
Ubuntu upgrade software and ubuntu upgrade system commands
Ubuntu common instructions and usage details
Ubuntu software
Linux (ubuntu 12.04)
Basic configuration and common software installation after ubuntu 18.04 installation