'System Administrator' Category

  • Convert file system to ext4

    May 21, 2022
    1 Convert the filesystem to ext4 Run the following command to convert from ext2 to ext4: tune2fs -O extents,uninit_bg,dir_index,has_journal /dev/sda1 For converting from ext3 to ext4, run the command: tune2fs -O extents,uninit_bg,dir_index /dev/sda1 2. Check the filesystem for errors e2fsck -pf /dev/sda1 3. Mount the filesystem mount -t ext4 /dev/sda1 /mnt You can check /mnt […]
  • Mutt’s keys shortcuts

    March 25, 2019
    Mutt Command Context Effect Relevant .muttrc settings a Sending Message Attaches a file to the message you have created none b Sending Message Lets you edit the list of blind carbon copy recipients for the message you have created none c Sending Message Lets you edit the list of carbon copy recipients for the message […]
  • How to delete mailq list with exim ?

    March 25, 2019
    exim -bp | exiqgrep -i | xargs exim -Mrm
  • RPI vcgencmd usage

    March 25, 2019
    Verified commands Command outputs are from firmware version 362371. vcgencmd command Shows a list of possible commands. root@raspberrypi:~# vcgencmd commands commands=”vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands, set_vll_dir, led_control, set_backlight, set_logging, get_lcd_info, set_bus_arbiter_mode, cache_flush, otp_dump, codec_enabled, measure_clock, measure_volts, measure_temp, get_config, hdmi_ntsc_freqs, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread, egl_platform_switch, mem_validate, […]
  • Remove swap on RaspberryPi

    March 25, 2019
    dphys-swapfile swapoff dphys-swapfile uninstall update-rc.d dphys-swapfile remove
  • Does Mac OS X have an equivalent to /dev/shm?

    March 19, 2016
    You can create and mount a ram based disk as follows: Create a disk: $ hdiutil attach -nomount ram://$((2 * 1024 * SIZE_IN_MB)) hdiutil will return the name of the ramdisk. Format and mount the disk diskutil eraseVolume HFS+ RAMDisk NAME_OF_DISK Creating a 100MB ramdisk: $ hdiutil attach -nomount ram://$((2 * 1024 * 100)) /dev/disk3 […]
  • Disk speed performance

    July 30, 2015
    Test your disk speed: fio –randrepeat=1 –ioengine=libaio –direct=1 –gtod_reduce=1 –name=test –filename=test –bs=4k –iodepth=64 –size=4G –readwrite=randrw –rwmixread=75 hdparm -tT /dev/root
  • SMTP, Send email with telnet

    July 29, 2015
    $> telnet localhost smtp Trying 127.0.0.1… Connected to localhost. Escape character is ‘^]’. 220 mailtest ESMTP Postfix (Debian/GNU) $> ehlo example.com 250-my-new-mailserver 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN $> mail from:<nico@example.com> 250 2.1.0 Ok $> rcpt to:<admin@example.com> 250 2.1.5 Ok $> data 354 End data with <CR><LF>.<CR><LF> $> Hi Admin, $> $> […]
  • Fail2ban secure your server

    July 29, 2015
    Few tips about fail2ban: How to delete or free a blocked ip: fail2ban-client get jail actionunban ipaddress
  • Bash completion

    June 2, 2015
    To prevent (on osx) the symlinks pause when you hit `tab`, add the following to your ~/.inputrc: set mark-symlinked-directories on