1.13 Linux Notes

Source: Internet
Author: User

Free-m look at the memory
Script

RPM-IVH Display Process
Rpm-u--upgrade
Rpm-f--freshen
Rpm-e--erase
RPM-E Koren


Find/-name kernel-* look for all files after Hernel

Ifconfig eth0 192.168.0.1 netmask 255.255.255.0

Service Network restart

Ifup eth0
Ifdown eth0

Route-n
Route add default GW 192.168.0.250

Route add-net 10.0.0.0 netmask 255.0.0.0 dev eth0 gw 192.168.0.250
Route add-host 10.0.0.3 Dev eth0 gw 192.168.0.250
Route Del-host 10.0.0.3

grep root/etc/passwd

grep Root/etc/shadow

grep root/etc/group
Useradd-u 6000-g tom-g root-d/home/jack-s/sbin/nologin

Usermod-s/sbin/nologin Jack

Usermod-u 50000 Jack

Usermod-l Jack.
Usermod-u Jack.
Usermod-r Jack.

Cat connects and outputs a file

cp/etc/skel/.bask*/home/natasha1/No environment variables

/etc/default/useradd useradd Standard T-template
Template for/etc/login.defs UID

############# Create 100 user test1~100 password Redhat
Vim useradd.sh
For user in $ (SQL 1 100)
Do
Useradd Test&user
echo Redhat |passwd--stdin Test$user
Done

chmod u+x useradd.sh
./useradd.sh


####################################
OpenSSH
Rpm-qa |grep OpenSSH
SSH IP
SSH [email protected]
Ssh-l Account IP
Service sshd status to see if SSH is running

SCP Secure File Transfer
Scp/tmp/abc.txt 192.168.0.18:/root
SCP 192.168.0.18:/root/abc.txt/tmp
-R recursive-p permission

Rsync Incremental Backup tool
Usage equals SCP

Ssh-keygen
CD. ssh/
Id_rsa id_rsa.pub
Ssh-copy-id-i Id_rsa Pub 192.168.0.18

################
FTP Lftp gftp
FTP 192.168.0.8
Account FTP (anonymous account)
Password null
Account Instructor
Password 2345667
Bye goodbye

Lftp 192.168.0.8
Equivalent to FTP
Support Tab

Get
Mget
Mirror
##############
Smbclient
Smbclient-l 192.168.0.254

Smbclient//192.168.0.254/ftp-u Instructor

SMBPASSWD-A Instructor
Fill in the password yourself

###############
Ping
Traceroute
Host
Dig = nslookup
Nslookup
Netstat-r
Netstat-ntulp |grep:22

##########
Vnc
/etc/issue See version

Vncserver:1 J Creating a VNC Desktop 1

Vi/root/.vnc/xstartup
Unset #去掉
EXEC #去掉
Gnome-seesion &

Vi/etc/sysconfig/vncserver
vncservers= "1:root 2:root" #去掉 1 means that the root of the desktop is connected with root
vncserverages[Change to 100]
Service Vncserver Restart

Vncviewer
VNC port number is 5900+ desktop number
can use Netstat-ntulp |grep:590x to query

SSH 192.168.0.17-x
X0vncserver--passwordfile=/root/.vnc/passwd Remote shared desktop

1.13 Linux Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.