Post

Linux Quick Tips on Customizing Vim and Verifying File Hashes

Simple steps to change your Vim colorscheme and verify file integrity using MD5 hashes.

I have cleaned up old blog posts but some are still relevant like the Linux Tips. I am consolidating and posting them here.

Here are two quick tips on how to customize your Vim environment and how to quickly verify file integrity using MD5 hashes.

Changing the Default Vim Colorscheme

Steps in changing your vim default color scheme

  1. Create a color config folder
1
mkdir -p ~/.vim/color
  1. Copy your preferred scheme from the share folder
1
cp /usr/share/vim/vim73/colors/slate.vim ~/.vim/color/slate.vim
  1. Set the scheme in vimrc
1
2
vim ~/.vimrc
add 'colorscheme slate'

2. Comparing Hashes to Verify Files via MD5

When you download a file and are provided with an md5 hash, you can verify the file’s integrity using grep to compare the hashes.

1
md5sum <file> | grep -i <hash>

e.g.

1
2
3
md5sum SuperNexus-2.0-i9100-BUILD3.zip | grep -i BB7E732FD0090F3ABD3D868C3F2F0C4F

bb7e732fd0090f3abd3d868c3f2f0c4f SuperNexus-2.0-i9100-BUILD3.zip

If you see an output line then the hashes are the same (case insensitive) and the file is verified correctly. If there’s no output, that means the hashes don’t match and the file is not valid or corrupted.

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.