User:Misterhaan/Ubuntu 23.10 Mantic Minotaur Setup: Difference between revisions
Misterhaan (talk | contribs) (Created page with "i use ubuntu cinnamon linux as my main operating system on my laptop. since the laptop came with windows 10 (which i upgraded to windows 11), i keep that around so i can choose windows on startup when i need one of the manufacturer's utilities. these instructions are what i did when i installed ubuntu cinnamon 23.10 mantic minotaur on my laptop westinghouse. = connections to other systems = most of what i use my laptop for is connecting to other systems, including my h...") |
(No difference)
|
Revision as of 20:18, 18 October 2023
i use ubuntu cinnamon linux as my main operating system on my laptop. since the laptop came with windows 10 (which i upgraded to windows 11), i keep that around so i can choose windows on startup when i need one of the manufacturer's utilities. these instructions are what i did when i installed ubuntu cinnamon 23.10 mantic minotaur on my laptop westinghouse.
connections to other systems
most of what i use my laptop for is connecting to other systems, including my home file shares. i set those up first so i have access to my files and the ability to connect to my home desktop and work computer right away.
i have command-line ubuntu installed on a different computer at home that stores my files, so my laptop should mount its shares when i'm on my home network. i can't just do a normal mount because if i travel with my laptop, my home server isn't available and i have to wait for those connections to time out before it will finish booting. still, the first couple steps are the same as mounting the shares from a desktop:
- edit
/etc/hosts
as root withsudo gedit /etc/hosts
and add a line mapping the lan ip of the server to its name. follow the format of the line that has 127.0.0.1 localhost. saving this change makes sure the laptop can resolve the name of the server, which usually doesn't work without this setting. - install nfs support with
sudo apt install nfs-common
- edit
/etc/fstab
as root withsudo gedit /etc/fstab
and add a line for each nfs share to mount, in this format:server:/nfs_share /local/mount/point nfs noexec,noauto 0 0
- create the local mount points for each share (the second column in fstab) with a command like
sudo mkdir /local/mount/point
#!/bin/bash SSID="your-wifi-ssid" INTERFACE=$1 ACTION=$2 ESSID=`iwconfig $INTERFACE | grep ESSID | cut -d":" -f2 | sed 's/^[^"]*"\|"[^"]*$//g'` if [ "$SSID" == "$ESSID" ] && [ "$ACTION" == "up" ]; then mount /local/mount/point/one mount /local/mount/point/two fi
the network shares should be mounted whenever connecting to the wifi SSID. the noauto
in fstab tells the system not to attempt to mount those shares on startup, so it doesn't have to wait for that to fail when they're not available. the NetworkManager script makes sure to mount them once connected to the correct wifi, but if you're going to connect to your network with a cable it's not going to recognize the network and you'll need to issue the mount commands manually.
change user id
ubuntu uses 1000 as the id for the user it creates, but i have a different id on my server and they need to match up for nfs to know who i am. you can't change your user id while you're logged in, so i'll create another admin account temporarily and use that. do that and set a password with the following:
sudo useradd -G adm,sudo -m -s /bin/bash tempadmin sudo passwd tempadmin
now log out and you should be able to log back in as tempadmin with the password you just set. run the following command to change your user id and update automounting:
sudo usermod -u [new_ID] [username] sudo setfacl -m "u:[username]:r-x" /media/ sudo setfacl -x "u:1000" /media/
now we just need to get rid of tempadmin, so log out and log back in as your actual user. run sudo userdel tempadmin
to go back to just one user.