Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
bobfather
Sep 20, 2001

I will analyze your nervous system for beer money
Hyper-V virtualizing CentOS, if you want to learn a console, or Fedora if you need a GUI.

Also, don't disable selinux. Figure it out and do it right and you'll feel good.

Adbot
ADBOT LOVES YOU

a mysterious cloak
Apr 5, 2003

Leave me alone, dad, I'm with my friends!


As much as I'd like a dual boot, I think I'll stick with a virtual box for now. I'm not really invested in making Linux my primary OS, just more of a curiosity thing. Although who knows.

Thanks for the suggestions, though. I've got Ubuntu running in VMware right now... I just don't know how to do anything at all with it in the terminal, but the UI is fine for the moment. Any tutorial suggestions? Just Youtube like crazy?

evol262
Nov 30, 2010
#!/usr/bin/perl
Use it as your desktop OS and you'll be forced to learn.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."





I love my VMs with Linux and *BSD. Especially when starting out, in case you mess up, just return to a previous save point. You also could dual-boot, and experiment with a Linux VM on top of a Linux host.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Nostratic posted:

As much as I'd like a dual boot, I think I'll stick with a virtual box for now. I'm not really invested in making Linux my primary OS, just more of a curiosity thing. Although who knows.

Thanks for the suggestions, though. I've got Ubuntu running in VMware right now... I just don't know how to do anything at all with it in the terminal, but the UI is fine for the moment. Any tutorial suggestions? Just Youtube like crazy?

I googled this, and haven't actually used it, but browsing through it looks like it covers the basics pretty decently: http://linuxcommand.org/

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I'll tell you what really helped me get comfortable with Linux was choosing to do some part of my work in it. As evol262 mentions its hard to learn if you're not using it all the time, and you're not likely to use it all the time if you just have this nebulous goal of "learn linux".

So, for example, for some types of software development it's just easier to do it on Linux than it is in Windows. I installed my IDE in my Linux VM, and have been doing my programming inside it for several years now. Works great.

You may not be a programmer, but you could choose to do some part of your "computing life" in Linux.

----------

Now, on to my question. I've been using collectd to monitor my home server. Yesterday I rebooted it for the first time in months and lo and behold, some subset of my hard drive device names changed. For example, root was on /dev/sdt, now it's on /dev/sdo.

A couple of collectd plugins use the device name to monitor the corresponding drive. This means that my historical data is now screwed up and I've got to redo a 30 metrics queries in grafana every time I reboot the server.

I see two theoretical ways of preventing this: Rewrite collectd plugins to use device guid's (GUID's are the correct solution right?), or making insert-whatever-linux-system-that-is-responsible-for-assigning-device-names always assign the same name to the same drive.

So, what should I do? I'd rather not rewrite collectd plugins, but I don't know if it's easy/possible to "fix" device names.

18 Character Limit
Apr 6, 2007

Screw you, Abed;
I can fix this!
Nap Ghost

Thermopyle posted:

Now, on to my question. I've been using collectd to monitor my home server. Yesterday I rebooted it for the first time in months and lo and behold, some subset of my hard drive device names changed. For example, root was on /dev/sdt, now it's on /dev/sdo.

A couple of collectd plugins use the device name to monitor the corresponding drive. This means that my historical data is now screwed up and I've got to redo a 30 metrics queries in grafana every time I reboot the server.

I see two theoretical ways of preventing this: Rewrite collectd plugins to use device guid's (GUID's are the correct solution right?), or making insert-whatever-linux-system-that-is-responsible-for-assigning-device-names always assign the same name to the same drive.

So, what should I do? I'd rather not rewrite collectd plugins, but I don't know if it's easy/possible to "fix" device names.

Time to learn about udev rules and persistence.

telcoM
Mar 21, 2009
Fallen Rib

Thermopyle posted:



I see two theoretical ways of preventing this: Rewrite collectd plugins to use device guid's (GUID's are the correct solution right?), or making insert-whatever-linux-system-that-is-responsible-for-assigning-device-names always assign the same name to the same drive.

So, what should I do? I'd rather not rewrite collectd plugins, but I don't know if it's easy/possible to "fix" device names.

The system that assigns the names is udev, and it probably already does something like that.

Look into /dev/disk directory. There should be subdirectories like by-name and by-id, populated with either symlinks to disk devices or actual device nodes (distro-dependent). When you need a disk device name that won't get changed after reconfiguring things and rebooting, use one of those.

Mao Zedong Thot
Oct 16, 2008


Thermopyle posted:

I'll tell you what really helped me get comfortable with Linux was choosing to do some part of my work in it. As evol262 mentions its hard to learn if you're not using it all the time, and you're not likely to use it all the time if you just have this nebulous goal of "learn linux".

So, for example, for some types of software development it's just easier to do it on Linux than it is in Windows. I installed my IDE in my Linux VM, and have been doing my programming inside it for several years now. Works great.

You may not be a programmer, but you could choose to do some part of your "computing life" in Linux.

Yes, exactly this. "learn linux" doesn't mean much in isolation. Using gnome as a desktop is entirely different to compiling kernels is completely different to managing a production server is completely different to sharing :filez: on your home network. Even "learn the commandline" doesn't mean much -- there are a gazillion completely different cli tools with only a small shared core of "here's how you get output from that thing to input of this other".

Definitely come up with specific goals, even if really arbitrary (install my preferred desktop setup in a shell script, build a debian package out of a tarball, watch netflix, whatever, etc.) -- and for me at least, immersion is everything, so I personally wouldn't use a VM (despite the huge advantages to doing so).

Peristalsis
Apr 5, 2004
Move along.

Thermopyle posted:

So, for example, for some types of software development it's just easier to do it on Linux than it is in Windows. I installed my IDE in my Linux VM, and have been doing my programming inside it for several years now. Works great.

Ruby on Rails programmers rarely use Windows environments for development. It can be done, but (last I checked), the gem versions and dependencies tend to get screwed up between platforms, and what works on your dev environment (i.e. Windows) will often break once you deploy to production (which is normally a Linux box). Then, whenever something goes wrong, and you have to ask a question online, everyone will tell you you shouldn't be doing it Windows because this is what you get, instead of actually helping you out. So, everybody does their RoR dev on a Mac or Linux box. All of which is to say that if you happened to want to learn RoR, it's a good candidate for Linux immersion.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Peristalsis posted:

Ruby on Rails programmers rarely use Windows environments for development. It can be done, but (last I checked), the gem versions and dependencies tend to get screwed up between platforms, and what works on your dev environment (i.e. Windows) will often break once you deploy to production (which is normally a Linux box). Then, whenever something goes wrong, and you have to ask a question online, everyone will tell you you shouldn't be doing it Windows because this is what you get, instead of actually helping you out. So, everybody does their RoR dev on a Mac or Linux box. All of which is to say that if you happened to want to learn RoR, it's a good candidate for Linux immersion.
This is probably true of almost anything outside of .NET dev nowadays. If you're on Windows and not developing against a remote runtime in Docker or a Vagrant VM, you're often playing with fire -- even case-sensitivity in the filesystem can burn a well-thought-out application with the platform differences neatly abstracted away.

YouTuber
Jul 31, 2004

by FactsAreUseless
How is the seamless desktop working on Windows when merging in a Linux session with VMware? I just purchased a new desktop and was tinkering with VFIO passthrough for my GPU so I could play video games when I realized I'm being an idiot and should just reverse the VM Host/Guest order.

Is VMWare still choice software or has something new come about?

YouTuber
Jul 31, 2004

by FactsAreUseless
Ok what the gently caress? How do you prepare Windows installation media on Linux these days? DD doesn't work, Unetbootin refuses to recognize my usb thumb drive and Winusb throws errors nonstop. What program do I need to get this poo poo sorted?

SamDabbers
May 26, 2003



YouTuber posted:

Ok what the gently caress? How do you prepare Windows installation media on Linux these days? DD doesn't work, Unetbootin refuses to recognize my usb thumb drive and Winusb throws errors nonstop. What program do I need to get this poo poo sorted?

Format your USB stick with an MBR partition table, one partition formatted with FAT32, and mark it bootable. Then mount the ISO and copy the contents to the USB stick and it should be bootable. This works with Windows 7 and up, and you can do it with GUI tools or parted/mkfs.vfat on the command line. The man pages are your friend.

RFC2324
Jun 7, 2012

http 418

YouTuber posted:

How is the seamless desktop working on Windows when merging in a Linux session with VMware? I just purchased a new desktop and was tinkering with VFIO passthrough for my GPU so I could play video games when I realized I'm being an idiot and should just reverse the VM Host/Guest order.

Is VMWare still choice software or has something new come about?

I've always had pretty good luck running a Linux guest in seamless mode with VirtualBox on a windows host.

Haven't done it in a long time tho so maybe it's broken now :shrug:

a mysterious cloak
Apr 5, 2003

Leave me alone, dad, I'm with my friends!


You guys all have good points about "learning Linux." I guess my first goal would be use it ask a desktop. Next would be maybe command line stuff, just because it looks interesting.

I'm not a programmer/IT person by any means. I just really want to play around with it. Windows does everything I need it to, but I played with Linux a bit maybe 10 years ago and liked it, but then my son was born and that changed, you know, everything, and I let it slide.

So I think what I'll do is fiddle around in a virtual machine a bit, play with different distros, and if it sticks I'll dual boot and dive in.

evol262
Nov 30, 2010
#!/usr/bin/perl
Realistically, don't futz with distros. Install Suse, Fedora, or Ubuntu (probably Ubuntu), and try to do "real", normal stuff with it (Spotify, gaming, work, whatever).

Eventually you may have to touch the command line. You'll Google a lot of stuff and copy and paste arcane looking commands into a terminal. These forums, serverfault (and associated communities), ask.ubuntu, and "man somecommand" will be your friends.

If you really want to learn the command line, pick a "real" task (plex, webserver, whatever) and look up how to make it work. Ask a lot of questions. telcoM is particularly good at very complete explanations.

But Linux isn't Linux from 10 years ago. As an average desktop user, you can get by almost wholly without the command line.

RFC2324
Jun 7, 2012

http 418

evol262 posted:

Realistically, don't futz with distros. Install Suse, Fedora, or Ubuntu (probably Ubuntu), and try to do "real", normal stuff with it (Spotify, gaming, work, whatever).

Eventually you may have to touch the command line. You'll Google a lot of stuff and copy and paste arcane looking commands into a terminal. These forums, serverfault (and associated communities), ask.ubuntu, and "man somecommand" will be your friends.

If you really want to learn the command line, pick a "real" task (plex, webserver, whatever) and look up how to make it work. Ask a lot of questions. telcoM is particularly good at very complete explanations.

But Linux isn't Linux from 10 years ago. As an average desktop user, you can get by almost wholly without the command line.

Also explainshell.com

CaptainSarcastic
Jul 6, 2013



evol262 posted:

Realistically, don't futz with distros. Install Suse, Fedora, or Ubuntu (probably Ubuntu), and try to do "real", normal stuff with it (Spotify, gaming, work, whatever).

But Linux isn't Linux from 10 years ago. As an average desktop user, you can get by almost wholly without the command line.

Yeah, desktop Linux has been incredibly smooth for several years now. If you're used to Windows and have reasonably competent equipment then a KDE desktop should be very familiar. I'd personally plug openSUSE as a daily-driver, but that's my own bias.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
Last time I tried Suse it was stupidly hard to set up full disk encryption during the install process. The graphical partitioner was over-complicated. Is this still the case?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I want to know my top resource-using processes over time. For example: For the past week the top 4 CPU-using processes are foo, bar, baz, boo and the top 4 RAM-using processes are your, mom, is, fat.

Is there any easy utilities to gather this info or do I need to write some scripts?

nexxai
Jul 17, 2002

quack quack bjork
Fun Shoe
I feel like I've got a bit of a stupid question but I've been banging my head against the wall because I can't figure out what the correct way to Google the problem is.

Assume I'm given the following line that has been copied to the clipboard and will be pasted into a shell script prompting for it:

code:
curl 'http://url.com/folder/playlist.m3u8' -H 'DNT: 1' -H 'Accept-Encoding: gzip' -H 'Accept-Language: en-US,en;q=0.8' 
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 
Safari/537.36' -H 'Accept: */*' -H 'Cache-Control: no-cache' -H 'X-Requested-With: ShockwaveFlash/22.0.0.209' -H 'Connection: 
keep-alive' -H 'Cookie: utag_main=_st:abcd1234; __utma=abcd1234; __utmz=abcd1234; s_fid=abcd1234; lcvv=abcd1234; 
AMCV=abcd1234; Authorization=abcd1234'  --compressed
I need to automatically take that .m3u8 file and write it to disk for further processing, so the script probably needs to add something like

code:
-o /tmp/outputfile.m3u8
to the end of it, but I'm having issues due to what I believe might be the semicolons in the various headers being interpreted as command separators, rather than part of the respective header's string. I end up getting an access denied error when I use my script meaning that (I think) the cookies aren't being passed or aren't being passed correctly, but if I just paste the whole curl command in a bash prompt, it works fine. With that we can rule out it being a curl/cookie problem and narrow it down to a nexxai-is-loving-up-somewhere problem.

Right now I have a couple of grep commands that strip out the URL ( grep -Eo "https?://[^ '>]+" ) and the headers ( grep -o '\-H.*' ) and then I generate my own curl command, but there's probably a better way to do it.

Can anyone give me a bit of guidance here?

[EDIT] False alarm. I was finally able to get youtube-dl to do my bidding and so this whole shell script business is unnecessary.

nexxai fucked around with this message at 17:06 on Sep 8, 2016

CaptainSarcastic
Jul 6, 2013



apropos man posted:

Last time I tried Suse it was stupidly hard to set up full disk encryption during the install process. The graphical partitioner was over-complicated. Is this still the case?

I think they simplified the installer with the release of 42.1, but I don't remember having issues with the partitioner in the past. I've also never used full disk encryption, so don't really know if the setup has changed. The main thing I find mildly annoying with the new installer is that it will default to BTRFS and multiple partitions instead of EXT4 and good old / and /home unless you tell it not to.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
I'm not that bothered about having a separate / and /home part these days, since I usually back anything important up on a different machine (regular rsync).

I know it's supposed to be good practice, but it seems easier to pop everything on / for me now.

fatherdog
Feb 16, 2005
I generally keep both /home and /var/log on different partitions, because they're the ones that are easy to fill up by accident.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
How come /var/log? In the case of a misbehaving program, dumping lots of errors?

fatherdog
Feb 16, 2005

apropos man posted:

How come /var/log? In the case of a misbehaving program, dumping lots of errors?

That, or anytime you raise the debug level of an application to troubleshoot something. Especially if you forget to lower it again afterwards.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
Ah. Never had to do debug levels before. I'll bear that in mind when partitioning next time.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

fatherdog posted:

I generally keep both /home and /var/log on different partitions, because they're the ones that are easy to fill up by accident.
Just put it in a quota'd ZFS dataset :haw:

alienhunter3
Aug 23, 2007
and don't call me shirley.

evol262 posted:


If you really want to learn the command line, pick a "real" task (plex, webserver, whatever) and look up how to make it work. Ask a lot of questions. telcoM is particularly good at very complete explanations.


+1 on this. I have friends ask me "how do I learn Linux" all the time. Really, you have to want to do something with it before you'll learn how to make it work. I got into it in the beginning because I thought that web servers were just the coolest things, and I could run apache on a computer at my house and control it via ssh from anywhere.

If you are into virtualization, a really cool project (if you don't mind buying some hardware) is setting up a server to act as a host for VMs. (I recommend KVM on top of CentOS 7.) That has the added advantage of allowing you to play with any distro you want; running them as VMs off of the host server. ESX is for chumps!

Buttcoin purse
Apr 24, 2014

alienhunter3 posted:

I could run apache on a computer at my house and control it via ssh from anywhere.

You can do that with Windows, although there are a lot less people doing it so it's harder to get help. I shouldn't have wasted so much time with Cygwin :suicide:

alienhunter3
Aug 23, 2007
and don't call me shirley.

Buttcoin purse posted:

You can do that with Windows, although there are a lot less people doing it so it's harder to get help. I shouldn't have wasted so much time with Cygwin :suicide:

Hahaha! To be fair, when I learned what Cygwin was, I pretty much thought that it was the best thing since sliced bread.

ToxicFrog
Apr 26, 2008


alienhunter3 posted:

Hahaha! To be fair, when I learned what Cygwin was, I pretty much thought that it was the best thing since sliced bread.

Yeah, Cygwin is one of the first things I install when setting up a windows computer. These days I have a laptop, so I don't use the desktop for non-gaming things nearly as much, but when I do it's really nice to have.

It also means I can back up my save files over ssh! :v:

Buttcoin purse posted:

You can do that with Windows, although there are a lot less people doing it so it's harder to get help. I shouldn't have wasted so much time with Cygwin :suicide:

I set up cygwin sshd on windows 7 and 10 machines recently, and it was really easy -- install cygrunsrv, run ssh-host-config, start it as a windows service. What went wrong when you did it?

alienhunter3
Aug 23, 2007
and don't call me shirley.

ToxicFrog posted:

Yeah, Cygwin is one of the first things I install when setting up a windows computer. These days I have a laptop, so I don't use the desktop for non-gaming things nearly as much, but when I do it's really nice to have.

It also means I can back up my save files over ssh! :v:



These days I don't bother with normal cygwin if I don't need sshd. MobaXterm gives you a cygwin install nicely packaged along with the terminal emulator and X. Since I download moba anyway, I don't see much point installing a second dedicated cygwin instance.

ToxicFrog
Apr 26, 2008


alienhunter3 posted:

These days I don't bother with normal cygwin if I don't need sshd. MobaXterm gives you a cygwin install nicely packaged along with the terminal emulator and X. Since I download moba anyway, I don't see much point installing a second dedicated cygwin instance.

In my case, I need an X server, bash, ssh, and a decent terminal emulator, but I also need sshd, make, git, and gcc, and at that point installing Cygwin is the easiest way to get all of those things.

feedmegin
Jul 30, 2008

There's also that Ubuntu-on-Windows-10 thing, which is actually pretty neat.

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

feedmegin posted:

There's also that Ubuntu-on-Windows-10 thing, which is actually pretty neat.
There's also been the SUA/SFU on Windows 7 and below.

some kinda jackal
Feb 25, 2003

 
 
Uhhh, I'm having sort of a brain fart moment.

I've got

PLATFORM=`uname -s`
echo Platform is ${PLATFORM,,}

and I'm trying to get "Linux" to show up as "linux", why can't I do

PLATFORM=${`uname -s`,,}
echo Platform is $PLATFORM

I'd prefer not to have to resort to

PLATFORM=`uname -s`
PLATFORM=${PLATFORM,,}
echo Platform is $PLATFORM

I'm sure this is bash 101 and I've missed the most obvious thing, but my head just isn't working right now.

kujeger
Feb 19, 2004

OH YES HA HA

Martytoof posted:

Uhhh, I'm having sort of a brain fart moment.

I've got

PLATFORM=`uname -s`
echo Platform is ${PLATFORM,,}

and I'm trying to get "Linux" to show up as "linux", why can't I do

PLATFORM=${`uname -s`,,}
echo Platform is $PLATFORM

I'd prefer not to have to resort to

PLATFORM=`uname -s`
PLATFORM=${PLATFORM,,}
echo Platform is $PLATFORM

I'm sure this is bash 101 and I've missed the most obvious thing, but my head just isn't working right now.

If you really want it to be one line, you can do PLATFORM=$(uname -s|tr '[:upper:]' '[:lower:]')

otherwise though, ${} specifically is for variables -- not just any random text. If it's possible to somehow coerce bash into doing it, I don't know how (and a cursory google search didn't reveal anything).

Adbot
ADBOT LOVES YOU

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior
Fun Shoe

Martytoof posted:

Uhhh, I'm having sort of a brain fart moment.

I've got

PLATFORM=`uname -s`
echo Platform is ${PLATFORM,,}

and I'm trying to get "Linux" to show up as "linux", why can't I do

PLATFORM=${`uname -s`,,}
echo Platform is $PLATFORM

I'd prefer not to have to resort to

PLATFORM=`uname -s`
PLATFORM=${PLATFORM,,}
echo Platform is $PLATFORM

I'm sure this is bash 101 and I've missed the most obvious thing, but my head just isn't working right now.

I gave this a try:

:~$ PLATFORM=$(uname -s)
:~$ echo ${PLATFORM,,}
linux

And it spits it out alright, I never knew about the ,,'s either that's neat.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply