Cov txheej txheem:

Kuv yuav nrhiav tau tus IP chaw nyob ntawm Unix server li cas?
Kuv yuav nrhiav tau tus IP chaw nyob ntawm Unix server li cas?

Video: Kuv yuav nrhiav tau tus IP chaw nyob ntawm Unix server li cas?

Video: Kuv yuav nrhiav tau tus IP chaw nyob ntawm Unix server li cas?
Video: Qhia saib yus tus hluas nkauj qhov chaw nyob 2024, Tej zaum
Anonim

Koj tuaj yeem txiav txim siab qhov IP chaw nyob los yog chaw nyob ntawm koj lub Linux system los ntawm kev siv lub npe hostname, ifconfig, lossis ib ip lus txib. Mus tso saib cov IPaddresses siv lub hostname hais kom ua, siv qhov kev xaiv -I. Hauv qhov piv txwv no IP chaw nyob yog 192.168.122.236.

Tsis tas li ntawd, kuv yuav nrhiav tau qhov chaw nyob IP ntawm kuv lub server li cas?

Yuav ua li cas nrhiav tus IP naj npawb thiab MAC chaw nyob ntawm daim npav network

  1. Nias lub Windows Start yuam sij qhib lub Start screen.
  2. Ntaus cmd thiab nias Enter kom pib qhov kev hais kom ua.
  3. Ntaus ipconfig /tag nrho ntawm cov lus txib kom kuaj xyuas cov teeb tsa networkcard.

Ib yam li ntawd, kuv yuav nrhiav tau kuv qhov chaw nyob IP hauv PuTTY li cas? Qhib Putty thiab sau koj lub Hostname los yog IPAddress hauv lub hostname los yog IP Chaw Nyob teb. Lub defaultport yuav yog 22. Nyem rau ntawm qhov qhib khawm qhib qhov hais kom ua linewindow. Hauv hom kab hais kom ua qhov rais hauv lub SSHusername ntawm tus ID nkag mus raws li sai thiab nias sau rau ntawm koj lub keyboard.

Ib yam li ntawd ib tug yuav nug, kuv yuav nrhiav tau tus IP chaw nyob ntawm UNIX hostname li cas?

Cov npe ntawm UNIX cov lus txib kom nrhiav tau tus IP chaw nyob los ntawm hostname

  1. # /usr/sbin/ifconfig -a. inet 192.52.32.15 netmask ffffff00 tshaj tawm 192.52.32.255.
  2. # grep 'hostname' /etc/hosts. 192.52.32.15 nyk4035nyk4035.unix.com ib.
  3. # ping -s `hostname` PING nyk4035: 56 cov ntaub ntawv bytes.
  4. # nslookup 'hostname'

Kuv yuav nrhiav tau kuv tus IP chaw nyob hauv Ifconfig li cas?

Txoj Kev 1 – Siv ifconfig Hais kom ua ifconfig cov lus txib feem ntau muaj nyob rau hauv / sbin directory. Yog li koj yuav xav tau cov hauv paus lossis sudo nkag mus rau qhov no rau ntau qhov kev khiav haujlwm. Raws li cov zis saum toj no, qhov system no muaj IP chaw nyob 192.168.10.199 ntawm Ethernet interfaceeth0.

Pom zoo: