linux

linux tips and tricks, notes and documentation

  • In grub boot screen type “e” for edit, and search for line starting with linux – add “init=/bin/bash” at the end
    • linux /boot/vmlinuz-version root=UUID=hex ro quite init=/bin/bash
  • Press CTRL+X to boot and execute following:
    • mount -o remount,rw /
  • enter “passwd” to change root password (or passwd username)
  • execute “sync” and make reboot

check your MTU settings with

user@computer:~$ tracepath -n www.cix.hr
1: 10.254.30.250 0.099ms pmtu 1500
1: 10.254.30.254 0.425ms
1: 10.254.30.254 0.405ms
2: 10.0.0.1 1.345ms
3: 212.92.211.193 4.111ms
4: 10.51.0.2 4.327ms
5: 10.50.0.74 192.967ms
6: 193.192.15.65 6.561ms asymm 7
7: 193.198.228.98 4.719ms asymm 10
8: 193.198.228.110 6.181ms asymm 9
9: 193.198.229.69 5.390ms asymm 10
10: 161.53.2.116 4.403ms reached
Resume: pmtu 1500 hops 10 back 54

How to open telnet/ssh sessions from firefox with putty? Simply add following script as application under Edit – Preferences – Applications.

#!/usr/bin/perl
# parse URL
 ($protocol,$host) = split /:\/\//, $ARGV[0];
 ($host,$port) = split /:/, $host;
# validate input
 if ( $protocol !~ /^(telnet|ssh)$/ ||
 $host !~ /^[a-zA-Z0-9][a-zA-Z0-9.-]*$/ ||
 $port !~ /(^[a-zA-Z0-9][a-zA-Z0-9_-]*$|^$)/ ) {
 warn "Invalid URL";
 exit 1;
 }
# if SSH, add -p argument
 if ( $protocol eq "ssh" && $port != '' ) { $port = "-p $port" ; }
# call terminal emulator
 exec("putty -$protocol $host $port");
 exit;

Script taken and modified from tolaris.