Linux

Added screenfetch to my ~/.zshrc file

vi ~/.zshrc

# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@ZSH:%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "

# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history

# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
_comp_options+=(globdots)               # Include hidden files.

screenfetch

# Load zsh-syntax-highlighting; should be last.
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null

on Terminal start I see

Forgot, how to install zsh on Linux (Ubuntu/Debian distros)

sudo apt-get install zsh

change to your default shell
chsh -s $(which zsh)
logout and back in

Automount a Windows Share with Read Write Access

I’ve got a number of Windows PCs around the house, I wanted to be able to access some of the shares from my main box which is running Manjaro Cinnamon.

When I first tried this I was using Linux Mint and had a number of issues, but I’ve now had time to try it again on my new PC running an Arch distro, below is how I got the Window share to automatically mount on startup.

Create a mount directory in the /mnt

Eg.

sudo mkdir /mnt/dl

I want to be able to access the shares easily from my home directory so I created a Symbolic Link

Eg.

sudo ln -s /mnt/dl ~/dl

Before you start playing make a backup of the fstab file

sudo cp /etc/fstab /etc/fstab.old

Create a Credential File

sudo vi /etc/.smbcredentials

add the 2 lines

username= {Windows Login Username}

password={Windows Login Password}

Save the file and quit

Add the Windows share to fstab file

Note: You must have a blank line between the local mounts and the Windows shares you are about to amount.

sudo vi /etc/fstab

add the line at the bottom of the file with a blank line

//{Share PC IP Address}/{Share PC Share Name} /mnt/dl cifs iocharset=utf8,sec=ntlmv2,auto,uid={Linux Username},gid={Linux Group Name},file_mode=0777,dir_mode=0777,credentials=/etc/.smbcredentials 0 0

The file should now look like

# /etc/fstab: static file system information.

#

# Use ‘blkid’ to print the universally unique identifier for a device; this may

# be used with UUID= as a more robust way to name devices that works even if

# disks are added and removed. See fstab(5).

#

#

UUID=71AE-F5B8 /boot/efi vfat umask=0077 0 2

UUID=a1572b7d-01ed-4e78-88a9-0c5ceb14c205 / ext4 defaults,noatime 0 1

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

//{Share PC IP Address}/****{Share PC Share Name} /mnt/dl cifs iocharset=utf8,sec=ntlmv2,auto,uid={Linux Username},gid={Linux Group Name},file_mode=0777,dir_mode=0777,credentials=/etc/.smbcredentials 0 0

Save the file and quit

If you Windows share has a space in the name replace the space with \040

Eg.

// {Share PC IP Address} / down\040load /mnt/dl

To test the mount(s) just added to fstab

sudo mount -a

if you get no errors try to access the share

Eg.

ls -ll /mnt/dl/

ls-ll ~/dl/

you should see the files in the directory and you should also have full access to the share.

The Windows shares should automatically mount when you next restart.