Category Archives: FreeBSD

Static routing

Solaris: route add host 192.168.1.12 192.168.1.1 Solaris, route persistent between reboots: route -p add host 192.168.1.12 192.168.1.1 Linux RedHat: route add -host 192.168.1.12 gw 192.168.1.1 Linux persistent routes: /etc/sysconfig/network-scripts/route-XXX where XXX – name of interface http://www.softpanorama.org/Net/Netutils/route.shtml Q1. Which command manipulates the routing table ? A: route  Q2: Command to add a route to server1 via router1: […]

Read more

NTP client troubleshooting

http://support.f5.com/kb/en-us/solutions/public/10000/200/sol10240.html   Observe the output with references on the fields presented in the previous table. Example of a successful NTP peer server query If the local ntpd process can communicate or attempts to communicate with a declared NTP peer server, the output from the ntpq command appears similar to the following example: # ntpq -np remote           […]

Read more

SSH forwarding where to look

Where to look if X11 forwarding does not work   1. In /etc/ssh/sshd_config should be the options: AddressFamily inet (if the host is ipv4 only) X11Forwarding yes 2. in /etc/hosts shold be 127.0.0.1 localhost (if the host is ipv4 only) 3. try debugging ssh session: /usr/sbin/sshd -d -p 222 4. DISPLAY environment variable should be […]

Read more

Multihost ssh tools

http://www.fabfile.org/   Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. It provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running […]

Read more

Some bash examples

Название файла без пути: $(basename $file) Меняем расширение у всех файлов в директории: for f in *.arc; do mv “$f” “`basename “$f” .arc`.dbf”; done; Название файла без расширения: Use ${x%.*} to remove everything after a dot or ${x%%.*} to remove everything after the first dot. Example: $ x=”/foo/fizzbuzz.bar.quux” $ y=${x%.*} $ echo $y /foo/fizzbuzz.bar $ […]

Read more

FreeBSD useful commands

Show all processes # ps -auxww Change locale http://www.maxblogs.ru/articles/rusifikatsiya-freebsd-2 charset=UTF-8 lang=ru_RU.UTF-8 LC_ALL=ru_RU.UTF-8 tc=default: # locale LANG=ru_RU.UTF-8 LC_CTYPE=”ru_RU.UTF-8″ LC_COLLATE=”ru_RU.UTF-8″ LC_TIME=”ru_RU.UTF-8″ LC_NUMERIC=”ru_RU.UTF-8″ LC_MONETARY=”ru_RU.UTF-8″ LC_MESSAGES=”ru_RU.UTF-8″ LC_ALL=ru_RU.UTF-8  

Read more