My 2018 Linux Test

Discussion in 'Operating Systems' started by JSumrall, Jul 28, 2018.

  1. IdiotInCharge

    IdiotInCharge [H]ardForum Junkie

    Messages:
    8,603
    Joined:
    Jun 13, 2003
    Whatever works best; GUIs aren't bad if they're well done. Some are.

    But I will concede that new features in evolving systems are generally exposed through CLI commands first :).
     
  2. ChadD

    ChadD 2[H]4U

    Messages:
    3,622
    Joined:
    Feb 8, 2016
    Linux permissions are really not that complicated once you understand the basics.

    GUI representations are often lacking, missing info... and imo just plain confusing. Many new Linux users who have not used Unix or other *nix operating systems before. Don't well understand permissions. Mostly as MS has done a very bad job respecting permissions over the years. For the most part windows users don't have to worry about such things as their unsecure OS doesn't do a great job of forcing software to respect permissions. (windows has improved... and mostly gets slammed for permission enforcement)

    There is lot of good reading out there on permissions... but to make it clear how easy it really is here is my 2 min break down.

    ls -l
    The ls command will list directory contents.... -l (long list) option will give you details of files in your current location.

    -rwxrwxrwx 1 chad chadsgroup 1024 Aug 10 12:00 FILE_NAME
    -rwxrwxrwx 1 chad chadsgroup 1024 Aug 10 12:00 ANOTHER_FILE
    drwxrwx--- 1 chad chadsgroup 4096 Aug 10 12:00 A_SubDirectory
    -rwxr----- 1 chad chadsgroup 1024 Aug 10 12:00 ANOTHER_FILE2

    When looking at this information what you need to know about permissions is the first string of letters isn't a random bunch of letters.

    The first character will tell you if the file is special in some way or just a regular old data file.
    - tells us its a normal file with data.
    d is a special character that simply means directory
    l you won't see often but its a symbolic link

    After this there are 3 sets of 3 letters. r w and x
    Read Write and Execute
    Each group denotes a group of users.
    The first 3 letters are for the files owner.
    The second 3 the group
    The final 3 for others.

    The rest of the data is Owner ... then group.... file size.... last modified date / time ... and then file name

    Now in the *nix world you will often see permissions described as a number. No one really says.... this file is Owner Read write execute... group read only... and others no access. Most users use numbers like 740 ect.

    chmod
    Is the command line tool to change permissions.
    Without getting into the numbers you can change permissions easily without knowing the numbering system it works like this.

    chmod +x testfile
    This command would add for the files owner execute permission to testfile. you can also add r and w permissions this way

    To change permissions for group or other users use 'g' or 'o'
    chmod g+rwx testfile

    You can also remove permissions
    chmod -x testfile

    File Permissions numbering
    0 = no permission
    1 = execute
    2 = write
    4 = read

    777 = (4+2+1) (4+2+1) (4+2+1)
    or read/write/execute for all

    755 = (4+2+1) (4+1) (4+1)
    So owner has full permission... group and others read and execute.

    So with this...
    chmod 700 filename
    Would give the owner full access and the group and other no access at all

    And my first example up top... 740, owner full permission group read only, others no access.


    A related useful terminal command is
    chown
    This tool can change the ownership of a file.
    So ;
    chown chad:chadsgroup filename

    You can use this to change the user or group a file is associated with.
     
    Last edited: Aug 10, 2018
    Meeho and B00nie like this.
  3. Mazzspeed

    Mazzspeed [H]ard|Gawd

    Messages:
    1,424
    Joined:
    Dec 27, 2017
    You can also change file permissions via the GUI, files can also be flagged to execute as a program via the GUI.
     
  4. ChadD

    ChadD 2[H]4U

    Messages:
    3,622
    Joined:
    Feb 8, 2016
    If your having what you believe are permission issues, the cli is still the fastest way to confirm and address it. My opinion anyway. Clicking 4 or more times in a GUI file manager to check and change permissions, is not faster. My advice to anyone that wants to consider themselves a serious or "power" Linux user... is take 5 min to properly understand file permissions. Without a doubt at some point... it will mean you fix something in a couple seconds instead of scratching your head and breaking your internet machine trying to find a solution. ;)

    Nothing drives me more crazy then talking to someone who says... well I was trying to make X do Y, and this thing I read said to find this file and type chmod 755 filename so I did that. When asked why they did that they rarely have any clue... "you know the instructions said it was step 2".

    Once someone has a basic understanding of the basic concepts and commands... it makes finding appropriate fixes that much easier. There is a lot of garbage online its nice to at least know just enough to be able to filter out the crap.
     
  5. B00nie

    B00nie [H]ardness Supreme

    Messages:
    7,824
    Joined:
    Nov 1, 2012
    File permissions and learning to audit logs - two most important things for a linux noob.
     
  6. Mazzspeed

    Mazzspeed [H]ard|Gawd

    Messages:
    1,424
    Joined:
    Dec 27, 2017
    Totally agreed, just letting newer users know there are options other than 'strictly terminal'.
     
    ChadD likes this.
  7. Mega6

    Mega6 [H]ard|Gawd

    Messages:
    1,438
    Joined:
    Aug 13, 2017
    Mythtv (Fedora) backend / Kodi RPi front ends.. using an old PVR-350 tuner card. Perl script to parse the TV guide which works nicely with the Kodi Mythtv plugin. Screw cable.
     
  8. pavel

    pavel Limp Gawd

    Messages:
    180
    Joined:
    Apr 8, 2014
    I would use Ubuntu. I have a like (not love)/hate relationship with it but when you are trying to find a solution to a problem/issue, when you google search, most of the 'how do I....?' questions/answers will be based on Ubuntu/Ubuntu users. Not all the time but it's usually Ubuntu. Mint is okay, too, but Ubuntu will be more up-to-date and Mint is mostly based on Ubuntu, anyway. I have tried Mint but I liked that there was less fussing around to tweak stuff - more recent kernel etc. with Ubuntu. If you want a different DE, just download and install it.
     
  9. Mazzspeed

    Mazzspeed [H]ard|Gawd

    Messages:
    1,424
    Joined:
    Dec 27, 2017
    I use the Playstation 'PlayTV' Dual USB tuners, they work really well and are cheap as chips second hand. ;)
     
  10. Mega6

    Mega6 [H]ard|Gawd

    Messages:
    1,438
    Joined:
    Aug 13, 2017
    Kool.. bought the 350 and a couple 250's new back in the day. With only one pci slot to work with, I expected to get a 250 with an adapter to fly but no luck.
     
  11. FNtastic

    FNtastic [H]ard|Gawd

    Messages:
    1,302
    Joined:
    Jul 6, 2013
    And, you can get paid for it!
    Granted that you understand it and have some good experience with it
     
    Frobozz likes this.
  12. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    It has been a while since an update, but things got complicated. The machine I was using decided to die, and I've now been using a machine from 2007. I've gotten pretty comfortable using Ubuntu so I've decided to get a bit more - involved so I'm working on setting up Archlinux. I'm hoping this will help me get more familiar with the CLI and linux commands in general. I kind of like hands on with things from the ground up and building Arch from a basic command line up to a full desktop GUI environment piece by piece seems interesting. Thank you all for your input as it has definitely helped me keep going.

    Also, just so you can get some closure, after a couple of reboots the Plex file permission issues seemed to just go away and it started working fine. I was able to stream to my Roku smooth as day.
     
  13. FNtastic

    FNtastic [H]ard|Gawd

    Messages:
    1,302
    Joined:
    Jul 6, 2013
    Just a heads up. If you want arch, may want to check out Manjaro. Typically a bit easier to work with and user friendly
     
  14. Todd Walter

    Todd Walter Gawd

    Messages:
    594
    Joined:
    May 10, 2016
    I'd say go with Gentoo. It's still compiled from source, but automated, so you don't have to get your hands dirty until you want to. This makes updating a lot less aggravating as the Portage system will take care of the dependencies for you.
     
  15. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    Thanks, but I'm going with Arch for right now. I'm not really looking for easier or user friendly at this point. I may give it a try later. Thank you for the recommendation though!
     
  16. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    I'm kind of into the 'get your hands dirty' phase.
     
  17. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    The first problem I'm running into, which may also have been a problem I've been having all along and didn't know it, is the install media I've been using.

    After downloading Arch and setting up the USB install, I kept running into a problem with just booting the live image. It would load, but then get to a point where it wouldn't find any hard drives. I tried both a Samsung & Seagate SSD, and neither would detect.

    After doing a bunch of research, and getting a headache in the process, it seems the way I was creating my USB live images just plain doesn't work sometimes. I have been using a tool called Universal USB Installer. And while, for the most part, it SEEMS like it should work, apparently this has been an issue for a long time. I found a thread from 2009 on the Archlinux BBS system where the thread creator was having the same error message I did:

    "It says "Boot device didn't show up after 30 seconds" and throws me into ramfs$."

    One of the Arch developers got into the discussion and stated this is happening because, and I quote, "it seems rather common that people remaster their USB images instead of dd'ing them (judging from the number of reports about this)."

    I had to research exactly what 'dd'ing' is. It looks like it is a command line tool for copying files from one location to another IN Linux. So if you're not working from Linux already (I'm working in Windows), dd'ing wasn't an option. Hence, I guess, why I was using Universal USB Installer, which works great for Windows, OpenSUSE, and Ubuntu ISO images but doesn't seem to work well with a lot of other distributions.

    So I went back and read the Arch installation guide, which led me to their USB flash installation media guide and sure enough, they recommend using a tool called Rufus. The rub seems to be Rufus gives you an option to write to the USB media in DD mode.

    Some clarification from brain0 on the thread at Archlinux BBS:

    "Some clarification: This was done so archiso wouldn't mount every single filesystem to look for the right image. Also, we are more flexible with respect to scan times on USB busses: We are able to check once a second if the archiso-device appeared, so if it takes 2 seconds, we can start booting after 2 seconds, and if it happens after 20 seconds, we won't abort before that. I sincerely hope that all reports of failures were due to people remastering the images and not setting the label in menu.lst properly."

    Original thread issue on Archlinux BBS: https://bbs.archlinux.org/viewtopic.php?id=77815

    Archlinux installation guide: https://wiki.archlinux.org/index.php/installation_guide#Verify_the_boot_mode

    Archlinux USB flash installation media guide/direct link to using Rufus: https://wiki.archlinux.org/index.php/USB_flash_installation_media#Using_Rufus
     
  18. GlacierNine

    GlacierNine Limp Gawd

    Messages:
    198
    Joined:
    Feb 9, 2017
    Manjaro is generally looked down on by most Arch users as Arch derivatives tend to, frankly, be far more broken.

    Arch is one of those things where if you're going to do it, you may as well do it properly. Manjaro and AntergOS are popular but as far as I can tell, they mostly form a diving board into "I should have gone with proper arch to start with".
     
  19. B00nie

    B00nie [H]ardness Supreme

    Messages:
    7,824
    Joined:
    Nov 1, 2012
    Arch is not a distribution for beginners, you're just making your life difficult with it.
     
  20. GlacierNine

    GlacierNine Limp Gawd

    Messages:
    198
    Joined:
    Feb 9, 2017
    I assumed with the thread being this old, you'd already have gone far past this point.

    I've used Rufus for everything for years at this point, including creating windows USBs. With a USB3 stick it takes a matter of a few minutes to completely recreate your install media if for some reason you need to DD instead of create it from ISO.

    Also I do agree that Arch is really just making your life difficult for no good reason. It's a much more complex distro to use and maintain, and with it being a rolling release, it's much more common to get updates that break things temporarily.

    Personally I think if you're interested in running a more complex distro that won't get in your way when you want to change something, but also works well out of the box, you should be looking at Fedora.

    https://getfedora.org/

    Installing Drivers on Fedora can be a pain if you do it the old way, but they did recently make it much easier to do.
     
  21. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    For now, I am able to boot into the Archlinux USB live image fine. But now I'm running into an issue with disk partitioning.

    I run lsblk and I see the sda1 partition I created, but I want to delete it. Every time I run fdisk /dev/sda1 and attempt to delete the partition I get an error message.

    And, while typing this I realized my mistake. I have to run fdisk on /dev/sda, not /dev/sda1.

    Herpaderp. lol
     
  22. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    I agree, it is definitely not for beginners.

    However, it is forcing me to learn and actually doing is how I learn. :)

    I've already learned quite a bit and I'm hoping that continues.
     
    FNtastic likes this.
  23. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    So I've learned how to create and delete partitions using fdisk.

    When learning about the types of settings creating partitions, here are some reminders (more for me than you)

    1. You can only have 4 primary partitions per drive. Not a problem most of the time but if for some reason you need more, they will have to be of type e (extended/logical).
    2. fdisk lists the hard drive in sectors. For the drive I'm using, it has 488397167 and trying to figure out how many sectors equals a GB is more complicated than I care to admit (each sector is 512 bytes, and breaking that into the millions is naughty for most calculators. So just remember, you can set values in recognizable sizes. For example, creating an 8GB swap file requires you to choose a last sector of +8G. This created a true 8 GiB partition that can then be set to swap. This also works for larger, primary partitions so +100G creates a 100 GiB partition.
    3. Always remember to 'w', write your changes before exiting fdisk. Otherwise you'll end up doing it 20 times like me. :p
     
  24. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    So with a couple of more commands, the hard drive is ready for system install.

    First, I formatted the primary partition to ext4: mkfs.ext4 /dev/sda1
    Second, I formatted the SWAP file: mkswap /dev/sda2
    Third, I initialized the SWAP partition: swapon /dev/sda2
    Fourth, I set the /mnt point to the first partition: mount /dev/sda1 /mnt

    The hard drive is now ready for system install.
     
  25. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    Now with a simple command, Arch is now installing to the hard drive:

    pacstrap /mnt base
     
  26. B00nie

    B00nie [H]ardness Supreme

    Messages:
    7,824
    Joined:
    Nov 1, 2012
    Nowadays you don't need a swap partition anymore, you can use a regular file without performance penalty.
     
    JSumrall likes this.
  27. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    AAAAAAAAAANNNNDDD, don't forget to toggle the boot flag in fdisk for the primary drive. :p
     
  28. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    AAAAAAAAAAAAAAANNNNDDD looks like I jumped the gun and there is more to do. : /
     
  29. BlueLineSwinger

    BlueLineSwinger Gawd

    Messages:
    602
    Joined:
    Dec 1, 2011

    Use 'parted' instead of 'fdisk' and format the drive as GPT instead of MBR. Choosing between the two.

    That said, there's rarely a need to partition up a system drive. Just install everything to / and use a swapfile as suggested.
     
  30. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    This is an older machine from 2007 so it uses MBR, not GPT.

    I've actually been using parted and fdisk, just learning both.

    I realize there's rarely a need to manually partition a system drive, but I was taking the opportunity to learn how to do it manually.
     
  31. BlueLineSwinger

    BlueLineSwinger Gawd

    Messages:
    602
    Joined:
    Dec 1, 2011

    Ah, yeah, missed/forgot the age of the system. MBR it is.
     
  32. ChadD

    ChadD 2[H]4U

    Messages:
    3,622
    Joined:
    Feb 8, 2016
    Ya its good to know how to do it... as Swinger was saying not to many reasons to bother on a standard desktop setup. Still good to know. The main reason to know it now is if you do plan to run multiple file systems. For a basic old desktop setup I wouldn't worry... but one advantage of partitioning is say putting btrfs on your root drive... and then using ext4 or xfs on your data / storage drives. Unless something changed recently btrfs/xfs is how SUSE installs by default. The advantage is being able to use the btrfs file system for system snap shots, and limiting snaps to your system install and not potentially terrabytes of other data.

    Anyway good knowledge to have even if your just go with one part 99% of the time in the future. One nice thing about arch... its install has you create partitions and set mount points for everything. There are not a ton of advantages to setting mount points for all sorts of things... but its possible for a reason. On some large Iron setups ect they will mount parts of the root system to different drives for various reasons. Its cool to get more of an understanding how that all works.

    There are some users of some of the non rolling type distros that do like to keep their /home mounted to another drive or part. The advantage there is instead of doing "upgrades" they will just wipe their root and reinstall... but keep their old /home directories. Some people even distro swap and keep their /homes more potential for stuff to get borked there... but I have myself kept a /home from say ubuntu to debian and had no issues.
     
    JSumrall likes this.
  33. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    After a few setbacks Arch is up and running. I had to learn how to edit a bunch of files using Vi. Once I was able to get the timezone, clock, localization settings, hostname file, and set the root password I was able to boot into the OS. Then, after setting up a non-root user, I logged in and went to run the system update through pacman -Syu, but it did not detect an internet connection. Seems as if by default the installation system enables dhcpcd.service so you can get an internet connection, but the actual install doesn't. So, after manually adding dhcpcd to startup with the system using systemctl enable dhcpcd.service, I now have internet access at system startup.
     
  34. B00nie

    B00nie [H]ardness Supreme

    Messages:
    7,824
    Joined:
    Nov 1, 2012
    I prefer nano over vi. Much easyer user interface.
     
    Algrim and ChadD like this.
  35. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    Haha! That does look a lot easier to use. Thanks!
     
  36. Zuul

    Zuul Gawd

    Messages:
    838
    Joined:
    Jan 7, 2013
    I went for Manjaro and it borked my laptop...it gave a few errors but it flashed too fast for me to register. Now running Ubuntu 18.10 with 4.20 kernel, latest nvidia drivers. My main rig is running the same but latest Mesa drivers. I don't know why the Arch based Manjaro distro fucked up but for a newbie like me Ubuntu works great
     
  37. IdiotInCharge

    IdiotInCharge [H]ardForum Junkie

    Messages:
    8,603
    Joined:
    Jun 13, 2003
    If Manjaro didn't work on a system, I'd be rightly startled- and take to Ubuntu next just to be sure there's nothing wrong with system. I'd also want to figure out why Manjaro didn't work, but that can wait till you're more comfortable with Linux.
     
  38. Zuul

    Zuul Gawd

    Messages:
    838
    Joined:
    Jan 7, 2013
    Manjaro did work until it didn't. There is nothing wrong with my comps.
     
  39. JSumrall

    JSumrall Limp Gawd

    Messages:
    282
    Joined:
    Jan 19, 2011
    I find Linux laptop compatibility to be challenging. So many custom pieces of hardware that Linux just doesn't handle very well.
     
  40. Zuul

    Zuul Gawd

    Messages:
    838
    Joined:
    Jan 7, 2013
    yeah it's a ROG G751 ...you're not kidding abuot the incompatibility.What I find strange is that it was working, and a reboot later it wasn't. I'm not really looking for an answer as Ubuntu works just fine.