Skip to content

Commit

Permalink
close #33
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Nov 26, 2023
1 parent 7f9072e commit 6919672
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 121 deletions.
2 changes: 1 addition & 1 deletion docs/linux/setup/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ tags:
## See also
[[windows/environment-variables|Windows environment variables]]
Setup [[windows/environment-variables|Windows environment variables]].
22 changes: 0 additions & 22 deletions docs/linux/setup/fonts-setup.md

This file was deleted.

34 changes: 34 additions & 0 deletions docs/linux/setup/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: General Linux Setup
tags:
- linux
---

+ [[swap-setup|Setup swap]]
+ [[ubuntu-postinstall|Ubuntu post-install]]

## Install fonts

Copy the fonts files to `~/.local/share/fonts/`. Then, run `fc-cache` to rebuild the cache.

```sh
fc-cache -fv
```

## Let Linux use local time

When dual-booting Linux and Windows, one might want to set the clock to the local time zone in Linux[^localtime]

```bash
timedatectl set-local-rtc 1
```

[^localtime]: https://itsfoss.com/wrong-time-dual-boot/

## NAS setup

Add the following entry to `/etc/fstab` to automatically mount NAS drives at boot

```txt title="/etc/fstab"
//NAS_IP/directory /mnt/point cifs credentials=/etc/samba/credentials,uid=1000,gid=1000,_netdev,x-systemd.automount,x-systemd.mount-timeout=10 0 0
```
13 changes: 0 additions & 13 deletions docs/linux/setup/linux-local-time.md

This file was deleted.

77 changes: 0 additions & 77 deletions docs/linux/setup/ubuntu-3rd-party.md

This file was deleted.

73 changes: 71 additions & 2 deletions docs/linux/setup/ubuntu-postinstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,72 @@ sudo apt clean && sudo apt update && sudo apt full-upgrade -y
## Setup 3rd party repos

[[ubuntu-3rd-party]]
Adding 3rd party repositories for latest packages not available in xUbuntu's official repositories.

First, install required package

```bash
sudo apt update && sudo apt install -y apt-transport-https ca-certificates curl git gnupg-agent software-properties-common
```

The setup repos for apllications:

- [[apt#apt-fast apt but faster|apt-fast]]
- [[brave]]
- [[docker]]
- [[git]]
- [[qbittorrent]]
- [[vivaldi]]
- [[vscode]]

### Kubuntu APP and KDE framework updates

[Kubuntu backports](https://launchpad.net/~kubuntu-ppa/+archive/ubuntu/backports): Latest versions of KDE framework and APPs

```bash
sudo add-apt-repository -y ppa:kubuntu-ppa/backports
sudo apt-get update && sudo apt full-upgrade -y
```

### Xanmod Linux kernel

[Xanmod](https://xanmod.org/) is a general-purpose Linux kernel distribution with custom settings and new features.

```bash
curl -fsSL https://dl.xanmod.org/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/xanmod-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/xanmod-keyring.gpg] http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list > /dev/null
sudo apt update && sudo apt install -y linux-xanmod
```

### Nvidia GPU computing (CUDA)

> The following section works for Ubuntu 22.04 LTS.
Install nvidia CUDA runtime and compatible [GPU driver](https://developer.nvidia.com/cuda-downloads).

```bash
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda
```

To add the CUDA compiler (`nvcc`) to the system `PATH`:

```sh "title=~/.profile"
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
```

### AMD and Intel open-source GPU driver (Mesa)

Install the latest Mesa open source GPU drivers from the [kisak PPA](https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa)

```bash
sudo add-apt-repository -y ppa:kisak/kisak-mesa
sudo apt update && sudo apt full-upgrade -y
```


## (Optional) Wine and 32-bit games support

Expand Down Expand Up @@ -160,7 +225,7 @@ sed 's/#.*$//' pkgs.txt | xargs sudo apt install -y
- Double click to open files instead of single clicks: `Workspace behavior` => `General behavior` => `click behavior`.
- Start with an empty session in `Desktop session`.
## Other apps if needed
## Applications
- [[miniforge|Conda]]
- [[setup-julia|Julia]]
Expand All @@ -169,3 +234,7 @@ sed 's/#.*$//' pkgs.txt | xargs sudo apt install -y
- [Hugo](https://github.com/gohugoio/hugo/releases/)
- [Pandoc](https://github.com/jgm/pandoc/releases/)
- [Virtualbox](https://www.virtualbox.org/)
## Themes
Setup [[linux-themes]].
14 changes: 8 additions & 6 deletions docs/linux/tips/copy-file-over-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags:

How to copy files through the secure shell (SSH).

## Using scp command
## Using `scp` command

`scp` works similar to the regular copy (`cp`) command.[^scp]

Expand All @@ -18,19 +18,21 @@ How to copy files through the secure shell (SSH).
scp [options] username1@source_host:directory1/filename1 username2@destination_host:directory2/filename2
```

## Using tar and pipe
## Using tar, pipe, and ssh commands

```sh
tar cvf - $localdir | ssh someone@somemachine '(cd destdir && tar xBf -)'
```

## Secure FTP (SFTP)
## Using `rsync` command

[Filezilla](https://filezilla-project.org/) could access remote servers via the Secure FTP (SFTP) protocol.
```sh
rsync -avh /source/folder/ username@nasip:dest/folder/
```

And newer versions of `scp` also use `sftp` by default.[^scpandsftp]
## Secure FTP (SFTP)

[^scpandsftp]: https://wiki.archlinux.org/title/SCP_and_SFTP
[Filezilla](https://filezilla-project.org/) and [WinSCP](https://winscp.net/eng/index.php) can access remote servers via the Secure FTP (SFTP) protocol.

## Mount remote directory as a disk via sshfs

Expand Down

0 comments on commit 6919672

Please sign in to comment.