List of virtual adapters your Virtual Linux can access

Hello ,

Its me again Raja and this time I came up with one more new post.

I have been through interesting problem.

As many of you know Virtual Box , sometimes even though we enable new adapter and configured IP in conf file it wont comes up. Everything seems fine , we have enabled adapter and configured name and IP for it but still it wont come up.

Simple solution : How many adapters your VM able to access can be easily know by using command

                             ls /sys/class/net
  In my case I have 3 adapters so it will display them

root@fresh:~# ls /sys/class/net
enp0s3  enp0s8  lo
root@fresh:~#

If you come across errors like device not found errors , try to found out how your VM identified the adapters that you have enabled.

Hope it helps.

Thank you.

Linux : full path of a file

Hello ,

Sometimes we need to have full or absolute path of file. And most of the times we used to pwd + filename manually.

But with google search I came across a command named as readlink.


readlink -f filename.txt

that will print complete path of filename along with filename append to it.

linuxmen@linuxmen-fresh:~/test/test1$ readlink -f ex4.js
/home/linuxmen/test/test1/ex4.js
linuxmen@linuxmen-fresh:~/test/test1$  

Note : make sure you are same directory where file resides else give relative path to file.

Hope it helps