Showing Wlan IP on ssh login boot
-
This is a way to show your wlan ip address when logging in via ssh. It can be changed to show eth also.
- edit /etc/profile . If you don't have nano installed, run opkg install nano to do so
- Add a line after line 4 with the following text : IP=$(/sbin/ifconfig wlan0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
- add another line with the following text : echo "wlan0 IP: $IP"
- save and exit
If you want to have the ethernet ip just change wlan0 to eth0
This is pretty standard to all Linux but i find it useful to have that info if you're working with a few accesses at the same time.
-
@Pedro-Baco Thanks for sharing! I also like how you've translated the slogan
-
@Pedro-Baco Cool
An associated but different tip for accessing/editing file on your Omega for those who are not highly familiar with editors like nano and who access their Omega from a computer and would prefer to use a GUI editor:
- On a Linux system (I'm using KUbuntu-14.04), using Dolphin File Manager:
- Under Network use Add Network Folder to set up an FTP network folder to your Omega (ftp://root@192.168.3.1:21/)
- Then you can access your Omega file system and edit files using (e.g.) Kate
- On a Windows system use something like WinSCP (http://winscp.net) to access your Omega file system:
- Set up connection with protocol: SCP IP Address:192.168.3.1 Port:22
- Then you can use WinSCP to transfer files between your computer and your Omega and use you favourite text editor to edit files - I use PSPad (http://www.pspad.com)
- Just one thing to watch that I have got caught by before: ensure your editor either can set line endings to use or will respect source line endings - some Windows based editors insist on using Windows line ending rather than Linux line endings and some Linux applications have problems with files with Windows line endings
- On a Linux system (I'm using KUbuntu-14.04), using Dolphin File Manager:
-
Notepad++ is what i use under Windows for editing such files @Kit-Bishop
-
@Pedro-Baco Yes, Notepad++ should be fine. I'm thinking of changing to use it.
EditPad Pro (http://www.editpadpro.com) is quite good too.
I work with diverse OS environments (Windows/Linux/Unix/Solaris) and have known people get in to trouble using the standard Windows Notepad to edit Linux config files because of line ending issues.