Here are some examples that I’ve tested on Ubunt


SAMBA

Edit samba configuration:

nano /etc/samba/smb.conf    

Share example:

[share_name]
guest ok = yes
path =
local_shared_dir
available = yes
read only = no
browseable = yes
public = yes
writable = yes
create mask = 0777

Restart samba:

systemctl restart smbd    

(stop, start)


NFS

SERVER:

Edit server NFS configuration:

nano /etc/exports

Share example:

/local_shared_dir 192.168.xx.0/24(ro,sync,no_subtree_check)

Export “NFS table” (this is necessary after NFS edit) :

exportfs -a     

Restarts NFS to apply changes:

systemctl restart nfs-kernel-server

CLIENT:

Share mounting examples:

terminal:

mount ser.ver.ip.address:/remote_share_dir /local_share_dir

fstab:

ser.ver.ip.address:/server_dir /local_mounting_dir nfs defaults 0 0

PROCESSES

Dynamic real-time view of processes:

top  

Search processes by name:

pgrep name_of_the_process 

List processes by user:

ps -u username 

Scroll the process list vertically and horizontally:

htop 

(apt-get install htop)

kill -9 name_of_the_process

Kill process by name without allowing process to do cleanup or restart

killall -9 PID

Kill process by PID without allowing process to do cleanup or restart


TAR

Create archive from directory or a single file:

tar -czvf archive.name.tar.gz /target.dir 

Extracts archive:

tar xzvf archive.name.tar.gz

Extracts archive in target directory:

tar xzvf archive.name.tar.gz -C /target.dir 

NETWORK INTERFACES

Lists available:

ifconfig -a 

List available with more info:

ip link show or ip addr or ls /sys/class/net 

TIME ZONE

Current time zone info:

timedatectl

List available time zones:

timedatectl list-timezones
  • Europe/Belgrade
  • Europe/Berlin
  • Europe/Brussels
  • Europe/Bucharest
  • Europe/Budapest
  • Europe/Chisinau
  • Europe/Copenhagen
  • Europe/Dublin

Set your timezone

timedatectl set-timezone your_time_zone

another way

Unlink localtime file:

unlink /etc/localtime 

Seting local timezone:

ln -s /usr/share/zoneinfo/Europe/Belgrade /etc/localtime 

To set the timezone this way you must unlinki localtime file