Mint Desktop

Permissions & Users

# adduser 	// add a user
# sudo passwd <username>	// change password
# sudo passwd root	// add password for root after installation
# /etc/shadow	// show all user accounts
# cat /etc/group	// show user groups
# id -u 	// show ID for username
# usermod -G www-data -a martin	// add martin to the www-data Group
# groups 	// show what groups matin is membver of	
# chown username:group directory	// change username and group of a directory
# chown username directory	// change user of a directory


>> PARTITION TABLE (msdos) >> NEW PARTITION (size) >> FORMAT (ext4/linux swap)

/dev/sda1/  /dev/sda2/ etc...
/dev/sdb1/  /dev/sdb2/ etc...
# df -h	// check permission size
# apt-get install gparted	// Graphical Disk Tool

Remove Programme - LIBRE Office

# apt-get remove --purge libreoffic*	// remove all the packages
# apt-get clean	// clean reduntant files
# apt-get autoremove

Installing on Virtual Box

////// SETTING UP NEW VM ///////
General/Advanced	Shared Clipboard & Drag N Drop = Biderectional
System/Motherboard	PIIX3 - USB Tablet - Enable I/O APIC - Hardware Clock
System/Processor	4    
Display/Screen	128MB Memory - Enable 3D Acceleration
Network	Enable Network Adapter - Bridged (Gets IP from Router) 
USB	Enable USB Controller - USB 2.0
Shared Folder	Add Desktop

# sudo adduser martin vboxsf	// Add user to vboxsf
(Then RESTART Virtual Box!)

////// GUEST ADDITIONS ///////
select virtual box CD in File Browser
Right Click space in right hand pane and select 'Run in Terminal'
(Or just install it from icon on desktop - worked on fresh install)

////// a lot of VBoxAdditions have user/group problems! could try.. ///////
# groupadd vboxusers
// and add your user to that group:
# usermod -aG vboxusers root

Back Up with TimeShift

# sudo apt-add-repository -y ppa:teejee2008/ppa
# sudo apt-get update
# sudo apt-get install timeshift

1. Format the USB key to ext4 with 'gparted'
2. Open Timeshift and choose the USB as the Snapshot Location
3. Disable Schedule
4. Create the Snapshot

5. Restore - Not tried it yet!!

Install GNS3

# sudo add-apt-repository ppa:gns3/ppa
# sudo apt-get update
# sudo apt-get install gns3-gui

// Add Shortcut to programmes
Open any file from /home/your-user-name/.local/share/applications/something.desktop (in sublime text)
Then Save As 'gns3.desktop' in the same folder after making below edits!

[Desktop Entry]
Comment=GNS3 Application

To Add IOS - Edit / Preferences / Dynamips / IOS Routers (scroll down to ADD!)

PC1> ip
PC1> save
PC1> show ip

Wireshark Error! # usermod -a -G wireshark martin	// Then restart

VLAN on Router Switch Card (No Switch IOS available for GNS3)
# vlan database (return)
#(vlan) vlan 10 name SALES (return)
#(vlan) exit (return)	// To create VLANS

Install Sublime Text Editor

Optional: remove any installed Sublime Text packages:
sudo apt-get --purge remove sublime-text*

# sudo add-apt-repository ppa:webupd8team/sublime-text-3
# sudo apt-get update

# apt-get install sublime-text         

Package Control List
HTML-CSS-JS Prettify (Requires Node.JS)
PyV8 (Gets Installed by something else)
Side Bar Enhancements
Theme - Afterglow

Re-Size VM Virtual Drive

1. Under VM/Storage/ right click disk and "Remove Attachment"
2. C:\Program Files\Oracle\virtualbox>vboxmanage.exe modifymedium "[YourPathToVdiFileOfYourVirtualMachine]" --resize 20000 (Shift Right Click - to open 'virtualbox' folder in Commmand Line)
3. Then go backe to VM and re-add the disk
4. Install gparted
5. Start gparted, delete extended partitions and resize sda1.

1. I added a new drive in Virtual Box.
2. Gparted, created 'Partition Table' then 'New Partition' and formatted as 'linux-swap'.
3. Right Clicked new partition and turned swap on.
4. Checked Swap in use with top command (reported 0).
5. Checked in 'fstab' file and could see old installation entry 'UUID'.
6. Ran 'blkid' to show current UUID of new disk/partion.
7. Used nano to edit the 'fstab' file and update the new 'UUID'. 

swapon --all	// Think turns on swap (same as right clicking drive in gparted)
swapon --summary	// Shows disk in use


# sudo add-apt-repository ppa:jon-hedgerows/get-iplayer   // Add PPA repositry
# sudo apt-get update	// Run Update (check new PPA in Software Store)
# apt-get install get-iplayer	// Install Get-Iplayer

# get-iplayer	// Run on its own to view directory listing of programmes
# get-iplayer "url of show"	// Run and download from URL
# get-iplayer --pid=b0756889, b9087766	// Download from PID or multiple with comma seperated list
# get-iplayer type=tv comedy	// List all the shows under comedy
#get-iplayer --pid=b7876556 --output /media/sf_Desktop   // Change output directory

// Install GiPlayer Graphical Interface
Downloaded giPlayer.deb from SourceForge and install

General Commands

# lscpu	// list cpu architecture
# mkdir	//create a directory
# touch <filename>	//create a file
# cp <filename> <filename>	//copy a file
# cat	//show the contents of a file
# rm -rf directory	//remove directory recursively and force

# nano ~/.bash_profile	//open your bash profile
# alias ll='ls -ll'	//and add this
# nano ~/.bash	// edit the users bash file

# apt-get install mlocate	// install mlocate
# updatedb	//run this to build a database for searching

# dig <hostname>	// look up domain name

Notes :-  Wheezy default user root - password raspberry


# cat /etc/network/interfaces	//show current set up
# netstat -nr	//shows route
# /etc/network/interfaces	//edit the interface
iface eth0 inet static

# ifdown eth0 && ifup eth0	//restart the interface without loosing ssh 

# ifconfig	// list IP addresses
# iwconfig	// used to set wireless paramaters (ie: the frequency)
# iwlist	// display wireless information 

Wireless Commands

# lshw -C network	// list network devices
# lspci -v	// list pci devices verbose
# lspci -nnk	// list motherboard devices

USB Commands

# lsusb	// list usb devices
# ll /dev/tty* // show groups for tty
# dmesg | grep tty	// list tty status

Bluetooth Commands

# hcitool dev	//show Device: 'empty'
# rfkill list	// show wireless and bluetooth devices
# dmesg | -i bluetooth	// show status


# apt-get install minicom	// install minicom
# minicom -s	// start up the the minicom config
9600 - 8N1 - !! turn off flow control !!
Set the /dev/ttyUSB0 !!

# usermod martin -a -G dialout	// add user to dialout group if needed

// Investigate to see what interface minicom is using?
# lsusb	// list usb devices
# ll /dev/tty* // show groups for tty
# dmesg | grep tty


Download Citrix Receiver for Debian 'Web Only' (16Mb)

////////// SSL CERTIFICATE ERROR (CHROME) /////////

The proper certificates were required to be in the correct directory.
Need to copy from their install location to the correct location required by the Citrix Client.

# sudo cp /usr/share/ca-certificates/mozilla/*.* /opt/Citrix/ICAClient/keystore/cacerts


# service apache2 restart
# service mysql restart
# service ssh restart
# service ufw status
# service --status-all	// list all running services
# pstree	// graphical services running