Category Archives: Linux

Linux mixed reality

How I broke and later fixed root shell

I was playing with shell changes and accidentally changed root user shell to nonexistent one. How did it happen? From Ubuntu terminal I switched to root’s environment executing “sudo su -” and then I tried to change login shell for root user performing chsh command. Instead of specifying correct shell with path like “/bin/sh” I… Read More »

Parse ifconfig to extract IPv4 and IPv6

ifconfig is a system administration utility in Unix-like operating systems which presents network interface configuration, including IP addresses, masks, Mac addresses and a lot of other stuff. The ifconfig output may be slightly varying on different operating systems. The utility is very frequently included in shell scripts to get some network parameters. The presented below… Read More »