I purchased a cheap refurbished Dell desktop recently to act as my home server - host my project apps, run CI/CD, and a database. This weekend I installed Ubuntu server on it, plugged in a hardwire connection to my router and fired her up.
htop
cat /proc/cpuinfo
cat /proc/meminfo
Tree listing of available storage
lsblk
This command will mount a filesystem temporarily:
sudo mount /dev/path/to/device /mnt/path/to/desired/mountpoint
If you also want automatic mounting after a reboot we must edit the the fstab
file by using this command:
sudo vi /etc/fstab
Once open, you can place your cursor on a new line of the file and specify the mount you want using this format:
/dev/sdb1 /mtn/data ext4 defaults 0 2
An explaination of the fields can be found on the fstab man page. In this example, we specify
There’s a very good thread that describes how easy a Linux backup is. Unlike Windows, you can just copy over
tar cvpzf backup.tgz \
--exclude=/proc \
--exclude=/lost+found \
--exclude=/backup.tgz \
--exclude=/mnt \
--exclude=/sys \
/
Sometimes you’ll want to append a date
#/bin/bash
now=$(date +"%m_%d_%Y")
echo "Filename : /nas/backup_$now.sql"
this will output as Filename : /nas/backup_04_27_2010.sql
Create a new pane to the right
Ctrl+b %
Create a new pane to the bottom
Ctrl+b "
Remove current pane
exit
Switch to left pane
Ctrl+b <-
Switch to right pane
Ctrl+b <-
Create a new window
Ctrl+b c
Switch to another window
Ctrl+b 0
Detach
Ctrl+b d
View running tmux sessions
tmux ls
Attach to session 0
tmux attach -t 0
Rename session from 0
to git
tmux rename-session -t 0 git