Tuesday, 15 December 2020

Securely erasing storage device

 Shred - overwrite data on a whole device with random bits.

1. Identify the name of the device

        fdisk -l     

 

Disk /dev/sdc: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: SAMSUNG HD103SJ
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes 


 
2.  Execute command::
                 
    sudo shred -v -n1 -z /dev/sdX
 
    -v flag is verbose and will print  the current progress
    -n1 overwrite blocks on the device "n1" times
    -z set all bits to zero after the last iteration
 
 
 ....
shred: /dev/sdc: pass 2/2 (000000)...920GiB/932GiB 98%
shred: /dev/sdc: pass 2/2 (000000)...921GiB/932GiB 98%
shred: /dev/sdc: pass 2/2 (000000)...922GiB/932GiB 98%
shred: /dev/sdc: pass 2/2 (000000)...923GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...924GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...925GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...926GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...927GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...928GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...929GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...930GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...931GiB/932GiB 99%
shred: /dev/sdc: pass 2/2 (000000)...932GiB/932GiB 100%


Thursday, 25 July 2019

Thursday, 21 February 2019

How convert mkv to mp4

  •  convert an input video file into a MKV file using VP8 encoding with VORBIS audio encoding
           ffmpeg -i input_video.avi -f matroska -vcodec vp8 -acodec libvorbis output_video.mkv

  • convert a video into a video using VP9 for video encoding and OPUS as audio encoding
           ffmpeg -i input_video.avi -f matroska -vcodec vp8 -acodec aac output_video.mkv

Friday, 8 February 2019

How enable ssh on ubuntu

To enable SSH:

sudo apt-get install openssh-server
After instalation the SSH service should be started automatically. You can start, stop or restart the service manually:

sudo service ssh start              (stop|restart)
To edit settings:

To change the port, root login permission, you have to edit the /etc/ssh/sshd_config file via:

sudo nano /etc/ssh/sshd_config

Remove # from the line 13.
9 # OpenSSH is to specify options with their default value where
10 # possible, but leave them commented.  Uncommented options override the
11 # default value.
12 
13 Port 22
14 #AddressFamily any
15 #ListenAddress 0.0.0.0
16 #ListenAddress ::

Saturday, 2 February 2019

Install MySQL Server on Ubuntu


  1. Install MySQL: 
    • sudo apt-get update 
    • sudo apt-get install mysql-server
  2. Start the ubuntu terminal
    • sudo mysql -u root -p
  3. Create a database
    • create database food
  4. Start the ubuntu terminal
    • sudo mysql -u root food -p 

Wednesday, 23 January 2019

Create a bootable USB stick on ubuntu

  1. Use the search field in Ubuntu "Startup Disk Creator"
  2. Select Startup Disk Creator
  3. Choose Source disc "some.iso" and Disk to Use "USB stick"

Wednesday, 9 January 2019

Securely erasing a storage device

Shred command-line utility overwrites data in a file and in a whole device

Set all bits to zero after the last iteration by adding the option -z

  •  sudo shred -v -n1 -z /dev/sdX

  • After this is necessary to create partition 
                     sudo apt-get install gparted
                     sudo gparted

Installing Minikube on Ubuntu 22.04 LTS