ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: "Денис Назаров" <marsden@mail.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Как узнать ip адрес от юзера
Date: Wed, 01 Apr 2009 15:14:34 +0400
Message-ID: <E1LoyOw-00078t-00.marsden-mail-ru@f111.mail.ru> (raw)
In-Reply-To: <21bd5bb90904010129x6885519fw6c701cfbe0a523d6@mail.gmail.com>



-----Original Message-----
From: "Mikhail A. Pokidko" <mikhail.pokidko@gmail.com>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Date: Wed, 1 Apr 2009 12:29:03 +0400
Subject: Re: [Sysadmins]Как узнать ip адрес от юзера

> 2009/4/1 Aleksey E. Birukov <birukov@vladinfo.ru>:
> > От рута нужно ifconfig, а от пользователя как узнать ip адрес?
> /sbin/ip a
> /sbin/ifconfig
> 
посидел полчасика, подумал...

/sbin/ip addr show dev eth0 | sed -r '/link/d;/mtu/d;s/(.)*inet(.)//ig;s/\/(.)*//ig;'

выдает чистый айпишник, без всего прочего. Прошу не пинать :)


  reply	other threads:[~2009-04-01 11:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01  8:26 Aleksey E. Birukov
2009-04-01  8:29 ` Mikhail A. Pokidko
2009-04-01 11:14   ` Денис Назаров [this message]
2009-04-01 11:21 ` Alexey I. Froloff
2009-04-01 11:29   ` Денис Назаров
2009-04-01 11:33     ` Alexey I. Froloff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LoyOw-00078t-00.marsden-mail-ru@f111.mail.ru \
    --to=marsden@mail.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git