Open mvn-vyle-dn opened 6 years ago
$ sudo useradd -m -c ‘lebavyclone' lebavyclone
Demo
$ sudo passwd lebavyclone
$ sudo userdel vyclone
$ sudo groupadd phpteam
$ sudo usermod -a -G phpteam lebavyclone
$ sudo groupdel phpteam
$ sudo apt install <software_name> $ sudo apt install nginx
$ sudo apt remove <software_name> $ sudo apt remove nginx
`$ sudo apt update & sudo apt upgrade`
$ sudo dpkg -i <package_name>.deb $ sudo dpkg -i skype.deb
$ sudo dpkg -r <package_name>.deb $ sudo dpkg -r skype.deb
$ sudo dpkg -l
$ ls -al
$ sudo chmod -R <permission> <file/folder> $ sudo chmod -R 675 test/
The result in the left is the param for the right $ history | grep cd
$ history | grep cd
Listing all processes $ ps
$ ps
`$ ls <option> <directory>` -l listing with peropety: owner, permission, time, size ... -a include hidden file and hidden directory `$ ll or $ ll -a`
$pwd
$ cd <directory>
$ cat <filename>
$ cp SOURCE DIRECTORY_DES
$mv SOURCE DIRECTORY_DES or mv [filename] [new_filename]
$ mkdir <name_directory>
$ rm <name_file>
$ touch <filename>
$ tail $ tail -f #show and keep the output, it is useful to check file change realtime $ tail -n 10 # show the last 10 lines
$ nano newfile1.txt
$ vim newfile1.txt
$ sudo su
$ find <filename/directoryname>
$ grep <pattern>
$ ifconfig
$ netstat
@at-vyle
CREATE NEW USER
$ sudo useradd -m -c ‘lebavyclone' lebavyclone
Demo
SET PASSWORD FOR USER
$ sudo passwd lebavyclone
Demo
DELETE USER
$ sudo userdel vyclone
Demo
CREATE NEW GROUP
$ sudo groupadd phpteam
Demo
ADD USER INTO A GROUP
$ sudo usermod -a -G phpteam lebavyclone
Demo
DELETE USER
$ sudo groupdel phpteam
Demo
INSTALL SOFTWARE USING COMMAND TOOL
Install new software using apt command
Demo
Uninstall software using apt command
Demo
Update software using apt command
Demo
INSTALL SOFTWARE USING COMMAND TOOL
Install new software using dpkg
Demo
Remove software using dpkg
Demo
List all package installed
$ sudo dpkg -l
Demo
LIST FILES IN DIRECTORY
$ ls -al
Demo
FILE PERMISSIONS
Update permission for file/folder
Demo
The | symbol
The result in the left is the param for the right
$ history | grep cd
Demo
System
Listing all processes
$ ps
Demo
FILE AND DIRECTORY
Listing file and directory
Demo
Get current directory
$pwd
Demo
Go to directory
$ cd <directory>
Demo
Show file content
$ cat <filename>
Demo
Copy one or more files to another location
$ cp SOURCE DIRECTORY_DES
Demo
Move file or rename file
$mv SOURCE DIRECTORY_DES or mv [filename] [new_filename]
Demo
Make directory
$ mkdir <name_directory>
Demo
Remove file
$ rm <name_file>
Demo
Create file
$ touch <filename>
Demo
Show the tail file
Demo
Open file in nano editor
$ nano newfile1.txt
Demo
Open file in Vim editor
$ vim newfile1.txt
Demo
OWER, PERMISSION
Login to root user
$ sudo su
Demo
Search
Search file or directory
$ find <filename/directoryname>
Demo
search a file for a pattern
$ grep <pattern>
Demo
Network
Show network information
$ ifconfig
Demo
Show information and statistics about protocols
$ netstat
Demo