Jump to content

Getting new to Linux, what are some ways to be a Master at using Linux?

Hello, 

I'm trying to view the manages for a particular section in this case I want to read every single System Admin command in the SysAdmin Commands catagory of the man pages. I was wondering what is the command to search for the section only and to read that section rather than knowing the command.

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Nayr438 said:

There is no such thing as sys admin commands. What would define commands for a system administrator would come back to the environment and what packages are currently installed. What I use in a environment could be very different than what you would. As a sys admin you are expected to know your environment.

 

mandb is more of a manual for individual utilities, not a book on how to use your system.

Question, what is the command to view all commands in linux with a description of those commands? Other than man -k

For ex: 

Shutdown - (BREIF DESCRIPT)

ACPI - (BREIF DESCRIPT)


Also, is there a command to view only a particular section in the linux terminal?

Link to comment
Share on other sites

Link to post
Share on other sites

If you scroll down to the bottom of any man page you'll see a section entitled: See Also

Wherein you'll find a list of related commands.

 

And as to why there isn't a "Master List" of commands, is that all of the individuals involved in coding the commands, don't have the time or the opportunity to do so.

However, at one time a few years ago there was a publication available with all of the man pages included. If I recall, the writer copied the pages, edited them for form so as to fit, but otherwise made no attempts at any further editing.

I wish I still had my copy, but it was lost many moves ago.

 

Found it

 Linux Man : The Essential Man Pages for Linux by John Purcell Pub:1997

Amazon has one available for $400, if you're interested

 

Also, there's a very good article explaining how to read the man pages at:

https://linuxhandbook.com/man-pages/

 

Not related, but the site also contains other valuable information, well worth a visit at least.

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, ZachTheDoggo said:

Question, what is the command to view all commands in linux with a description of those commands? Other than man -k

For ex: 

Shutdown - (BREIF DESCRIPT)

ACPI - (BREIF DESCRIPT)


Also, is there a command to view only a particular section in the linux terminal?

man -k . | less
man -s 8 -k . | less

Where 8 is the section, which can be obtained from

man man

Things to note

  • Not every entry is a command
  • Not every command will have a entry
  • Not every entry will be relevant to you
Link to comment
Share on other sites

Link to post
Share on other sites

-= Topics Merged =-

Keep your conversation to one thread. Stop reposting your topic.

COMMUNITY STANDARDS   |   TECH NEWS POSTING GUIDELINES   |   FORUM STAFF

LTT Folding Users Tips, Tricks and FAQ   |   F@H & BOINC Badge Request   |   F@H Contribution    My Rig   |   Project Steamroller

I am a Moderator, but I am fallible. Discuss or debate with me as you will but please do not argue with me as that will get us nowhere.

 

Spoiler

  

 

Character is like a Tree and Reputation like its Shadow. The Shadow is what we think of it; The Tree is the Real thing.  ~ Abraham Lincoln

Reputation is a Lifetime to create but seconds to destroy.

You have enemies? Good. That means you've stood up for something, sometime in your life.  ~ Winston Churchill

Docendo discimus - "to teach is to learn"

 

 CHRISTIAN MEMBER 

 

 
 
 
 
 
 

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Nayr438 said:
man -k . | less
man -s 8 -k . | less

Where 8 is the section, which can be obtained from

man man

Things to note

  • Not every entry is a command
  • Not every command will have a entry
  • Not every entry will be relevant to you



Thank you, I appreciate it! 🙂 That's exactly what i'm looking for.

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/27/2022 at 3:38 AM, ZachTheDoggo said:

What are some ways to effectively learn Linux

Honestly the best way is to just use it for a few months. As "problems" present themselves you can focus your research on that specific topic.

On 11/27/2022 at 3:38 AM, ZachTheDoggo said:

* What's a Library in Linux? Explain in simple terms please.

Very loosely, a library is a set of premade functions you can use when writing a program. It's not specific to Linux.

On 11/27/2022 at 3:38 AM, ZachTheDoggo said:

* For the man command, is there a command that allows you to view the contents of a particular section, Let's say I want to learn about adding a user account, can I navigate to a particular section or search a description in using Man or info command? 

Man provides documentation about specific programs or commands, if you want to learn about general topics like user account management you should look it up online or on a wiki such as the Arch Wiki.

On 11/27/2022 at 3:38 AM, ZachTheDoggo said:

* What's a file manager, repo, desktop manager, display manager.

These are topics that would take dozens of pages to explain thoroughly, I recommend you read up on them on the arch wiki. A file manager is a program analogous to Windows Explorer that lets you navigate files on your system. A desktop environment (I assume that's what you mean) is a collection of programs that constitute your destkop graphical user interface. A display manager is essentially a graphical login screen that loads up your desktop environment. A repository is a centralized online collection of packages you can install using your package manager; it's kind of like a phone's app store.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

first of get used to the shell (default has been bash for a long time but the choice is yours bash,zsh,fish,ion ...)

here is a good resource for bash: https://devhints.io/bash

 

secondly , i noticed that there were some people commenting compgen stuff , ive written some handy scripts using that

first one: (i named this one findexe.sh and created a symlink ( first make it executable: chmod +x  ~/scripts/findexe.sh) to /usr/local/bin (sudo ln -sv $PWD/scripts/findexe.sh /usr/bin/findexe) , so you can run it like any other program. (findexe arg arg arg):

#!/usr/bin/env bash

function wrapitems()
{
ARGS=$(echo "$@" | xargs printf -- '.*?%s')
FOUND=$(compgen -A function -bcak | grep -Ei "$ARGS.*?\$")
echo $FOUND

}
function itemforline()
{
ARGS=$(echo "$@" | xargs printf -- '.*?%s')
FOUND=$(compgen -A function -bcak | grep -Ei "$ARGS.*?\$"|xargs -n1 echo )
printf "$FOUND"

}

case $1 in
'-#' )
shift 1
itemforline $@ |uniq |sort
;;
'-0' )
wrapitems $@ | uniq |sort
;;

* )
itemforline $@ | uniq | sort | column
;;

esac

using the script : findexe top$  , wil list all runable things that end with top:image.png.6b12d8c7d96087dacdfc140066088b98.png

or findexe ^nv c g

wil list all runnables that start with nv and have a 'c' and a 'g' after that:

image.png.9814911809495fe59e90220b2f6fd3d5.png

 

 

 

second script: (i named it lsexe.sh , but same deal):

#!/usr/bin/env bash

function lscompgen()
{
echo "################# ${1} #################"
compgen "${2}${3}"
echo "############################################"
}
case $1 in
a*)
lscompgen ALIASSES -a
;;
b*)
lscompgen BUILDINS -b
;;
c*)
lscompgen COMMANDS -c
;;
f*)
lscompgen FUNCTIONS -A function
;;
k*)
lscompgen KEYWORDS -k
;;
*|A*)
lsexe a
lsexe b
lsexe c
lsexe f
lsexe k
echo "############# HELP #################"
echo "use: $lsexe [a|b|c|f|k|A]"
;;
esac

image.png.541bbe8211c24840f49b48dba627cd1e.png

lsexe k will list all the keywords  the shell knows...

lsexe will list all , 1 per line

this might be usefull , combined with grep or smth

 

 

adding this to your .bashrc , will make the uparrow go back in history taking into account the letters  that you already typed:

#!/usr/bin/env bash
# ############################################################################
# # PATH: /opt/local/scripts/rc/bash/
# # FILE: 221_binds.conf
# ############################################################################
#
## Use the up and down arrow keys for finding a command in history
## (you can write some initial letters of the command first).
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
bind 'set completion-ignore-case on'
#
# ###########################################################################
# # EOF:: /opt/local/scripts/rc/bash/221_binds.conf
#############################################################################

bind.gif.c953e79827e5b8e61db8cc053113d0da.gif

Link to comment
Share on other sites

Link to post
Share on other sites

and  almost forgot: (you can defenetly find more of these on every topic pertaining linux just search the web 🙂 )

Spoiler

wp10585488-cheat-sheet-wallpapers.thumb.jpg.2533461a3350052b4075c72378af23eb.jpgwp10585537-cheat-sheet-wallpapers.thumb.png.83cb34bb461fc22370abd3de844be5be.pngzjhxb5v9vs221.thumb.jpg.6de06cfe9c3844d9f9515f1993e91eab.jpg

 

 

xi6qlwt4vs221.thumb.png.c46040f8b161cb1f169a8b9d083e9db7.png

 

 

 

 

 

Spoiler

1EJLOqd.thumb.png.4d8c7b6a86229a4c6588a6733f23ea64.pngyWfCliF.thumb.png.895c4b1f1e1b7832a006fa409b8ede5c.pngwp10585384-cheat-sheet-wallpapers.thumb.png.55af079474a1590333568843f53eb6de.png

 

 

 

 

 

Spoiler

vimdark_by_mrpizzalust_d8w2f89.thumb.jpg.acc8f449118b209b4ace8fdb82617be8.jpg

 

Link to comment
Share on other sites

Link to post
Share on other sites

Well, it hasn't been mentioned yet, but you asked for jumping to a particular section of a manual.  It's not quite what you're looking for, but you can use the grep command and "pipe" commands to it.

 

man whatever | grep whatever you're looking for.

 

So, if you know what you want you're searching for, it will return only that word, phrase, or maybe a very small section.  You may want to do:

 

man grep

 

to learn more about it.

 

Also, there is the "more" command, which will pause per screen of text, and you have to press Enter or spacebar to see more.

 

As mentioned, the "less" command will also do this, but it seems to actually do more than more, because... the cliche.

: JRE #1914 Siddarth Kara

How bad is e-waste?  Listen to that Joe Rogan episode.

 

"Now you get what you want, but do you want more?
- Bob Marley, Rastaman Vibration album 1976

 

Windows 11 will just force business to "recycle" "obscolete" hardware.  Microsoft definitely isn't bothered by this at all, and seems to want hardware produced just a few years ago to be considered obsolete.  They have also not shown any interest nor has any other company in a similar financial position, to help increase tech recycling whatsoever.  Windows 12 might be cloud-based and be a monthly or yearly fee.

 

Software suggestions


Just get f.lux [Link removed due to forum rules] so your screen isn't bright white at night, a golden orange in place of stark 6500K bluish white.

released in 2008 and still being improved.

 

Dark Reader addon for webpages.  Pick any color you want for both background and text (background and foreground page elements).  Enable the preview mode on desktop for Firefox and Chrome addon, by clicking the dark reader addon settings, Choose dev tools amd click preview mode.

 

NoScript or EFF's privacy badger addons can block many scripts and websites that would load and track you, possibly halving page load time!

 

F-droid is a place to install open-source software for android, Antennapod, RethinkDNS, Fennec which is Firefox with about:config, lots of performance and other changes available, mozilla KB has a huge database of what most of the settings do.  Most software in the repository only requires Android 5 and 6!

 

I recommend firewall apps (blocks apps) and dns filters (redirect all dns requests on android, to your choice of dns, even if overridden).  RethinkDNS is my pick and I set it to use pi-hole, installed inside Ubuntu/Debian, which is inside Virtualbox, until I go to a website, nothing at all connects to any other server.  I also use NextDNS.io to do the same when away from home wi-fi or even cellular!  I can even tether from cellular to any device sharing via wi-fi, and block anything with dns set to NextDNS, regardless if the device allows changing dns.  This style of network filtration is being overridden by software updates on some devices, forcing a backup dns provuder, such as google dns, when built in dns requests are not connecting.  Without a complete firewall setup, dns redirection itself is no longer always effective.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Timpster said:

man grep

 

to learn more about it.

 

Also, there is the "more" command, which will pause per screen of text, and you have to press Enter or spacebar to see more.

  • more : well  actually more is the really old pager, it also buffers the entire text
  • less: less is slightly newer, and buffers only part of the text (may be usefull for large texts of wich you only care about the first or last part
    • head | tail :  that being said for viewing specifically only the first or last 'n' lines you can use head -n 10 same with 'tail'
    • tail:  tail can also be used with 'tail -f' wich will follow the text as new lines are created (active logs eg)

but what i actually recommend is using bat (better cat) , its a improved version of cat that includes a pager , and more importantly colorisation / syntax hl

you can also use bat as the default manpager (the pager used to view manual pages eg 'man rg'*

*ripgrep being an improved and more versatile grep

 

you can add this to your bashrc to change the default manpager to bat:

# MANPAGER
# Bat as Default Manpager
export MANPAGER="sh -c 'col -bx | bat -l man -p'"

comparrison between the default manpager ( being less)

 

image.thumb.png.dee139dfcaf080ff04cd5d78ab516f3e.png

and bat:

image.thumb.png.7dd12e9f0ba4539adf9284ff63988243.png

 

as the cherry on top bat and ripgrep have some nice integration with each other: batgrep:

cat + grep (top) vs batgrep(bottom)

image.png.b171375a3fd2157ee7ac6df11fa41029.png

 

 

 

and as a final bonus : you can view your previous commands with history, but its rather limited , histories scope is limited to the current terminal, and by default it overwrites the prev session , most distros however have set it to append , but still its rather limited and you will lose allot of commands .... ive got some scripts that fix that behavior (collects all terminals into a single history file, and makes the last command of tty1 instantly availeble in the history of tty2 , ill post these some other time as installing and using bashhub for this purpose is prolly way easier to setup ,  and it has  the  added benefit of cloud storage and history of multiple user accounts (regular and root eg) and over multiple machines.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Well, most of that is way over my head, even just the head | tail stuff, but I do understand tail -f.  Never used ANY of what you've mentioned here, but it's still interesting all the things human beings create for this system.

 

Edit:  I did start using the tail command for pi-hole.  That's extremely fun to me.  I used to fire up firefox, wait for that to load, go directly to the pi-hole query log page, wait for that to load, and it's a static page, so I have to refresh it.  Tailing it is so much faster it's really enjoyable to see it in real-time updates.

 

Regarding losing commands, WOW is that infuriating.  Going from TTY1 to a terminal app, and nothing transfers over, so you have to go back, somehow write it down or save it in a file, go back to the desktop, yes.  Experienced that countless times, very annoying.  Even in a VM, and rebooting, sometimes it doesn't always save.  And yeah, I've lost a lot of commands this way, virtual or not.  But to me it takes too much energy and thought to script or fix these things, and I'd just rather do them manually if I really need the command.

 

I can tell you're well past my understanding of the system, and I've been using it on and off since 2007!

: JRE #1914 Siddarth Kara

How bad is e-waste?  Listen to that Joe Rogan episode.

 

"Now you get what you want, but do you want more?
- Bob Marley, Rastaman Vibration album 1976

 

Windows 11 will just force business to "recycle" "obscolete" hardware.  Microsoft definitely isn't bothered by this at all, and seems to want hardware produced just a few years ago to be considered obsolete.  They have also not shown any interest nor has any other company in a similar financial position, to help increase tech recycling whatsoever.  Windows 12 might be cloud-based and be a monthly or yearly fee.

 

Software suggestions


Just get f.lux [Link removed due to forum rules] so your screen isn't bright white at night, a golden orange in place of stark 6500K bluish white.

released in 2008 and still being improved.

 

Dark Reader addon for webpages.  Pick any color you want for both background and text (background and foreground page elements).  Enable the preview mode on desktop for Firefox and Chrome addon, by clicking the dark reader addon settings, Choose dev tools amd click preview mode.

 

NoScript or EFF's privacy badger addons can block many scripts and websites that would load and track you, possibly halving page load time!

 

F-droid is a place to install open-source software for android, Antennapod, RethinkDNS, Fennec which is Firefox with about:config, lots of performance and other changes available, mozilla KB has a huge database of what most of the settings do.  Most software in the repository only requires Android 5 and 6!

 

I recommend firewall apps (blocks apps) and dns filters (redirect all dns requests on android, to your choice of dns, even if overridden).  RethinkDNS is my pick and I set it to use pi-hole, installed inside Ubuntu/Debian, which is inside Virtualbox, until I go to a website, nothing at all connects to any other server.  I also use NextDNS.io to do the same when away from home wi-fi or even cellular!  I can even tether from cellular to any device sharing via wi-fi, and block anything with dns set to NextDNS, regardless if the device allows changing dns.  This style of network filtration is being overridden by software updates on some devices, forcing a backup dns provuder, such as google dns, when built in dns requests are not connecting.  Without a complete firewall setup, dns redirection itself is no longer always effective.

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/7/2022 at 11:07 AM, Sauron said:

Honestly the best way is to just use it for a few months. As "problems" present themselves you can focus your research on that specific topic.

This is the best advice here. I could give you a list of things I did when I started using Linux, but they'd only be good if your interests and personality match mine very closely. 

 

Whether you want to run Linux to game, code, or make art the best way to learn is just to start doing stuff. Then each time you run into a problem, solving that problem will teach you something.

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/26/2022 at 11:38 PM, ZachTheDoggo said:

Hello LTTForum, I recently decided to start my Linux journey, I've always wanted to try Linux but never knew how to, just recently I have decided to take a passion into learning the operating system as that you can do a lot with it. Do you recommend any videos reguarding the subject?

What are some ways to effectively learn Linux, as well as if you had any tips or tricks I should need to know.

Currently, i'm stuck on the following if you can also answer these it would make my day too:

* What's a Library in Linux? Explain in simple terms please.

* For the man command, is there a command that allows you to view the contents of a particular section, Let's say I want to learn about adding a user account, can I navigate to a particular section or search a description in using Man or info command? 

* What's a file manager, repo, desktop manager, display manager.

Thank you!


Just use it. Naturally your mental workflow will adapt to the environment. Or even better, you'll realize that you don't need to learn a new operating system you need to make your new operating system behave like you want.

Today my main operating system is Linux and I feel much more confortable on in than on MacOS or Windows just for "the time that we spend together haha". Theres no real secret nor special way or distribution to start. At first the challenges will be big, stuff will break and you won't understand why. Thats natural.

If you persist something very weird will happen, the OS that everyone uses will become extremelly difficult to use and complex... Linux is not really difficult, its different, like MacOS, Windows or any other operating system but you had years of experience on another system, it takes time to switch your mind and you have to give time and persistence.

"I dont know what i'm doing here. Do you?"

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/3/2022 at 5:36 PM, Arokan said:

They say you don't need the command line for Linux. True, but that's actually half the fun with it 😄

The best way to learn is to get a distro that's as light-weight as they come, I'd recommend Debian right out; Pop does too much for you, and then do everything yourself.

Distro actually doesn't really matter, it just determines the pre-installed programs and environment with which they come. You can change everything afterwards.

 

So, Debian comes with GPU-drivers that old that you don't really wanna use them, so you have to add another repo. KDE doesn't look too fresh from the beginning, so you have to customise it. The next addiction comes with conky, you'll wanna use that now that you've joined the cool kids' club. But that's not enough anymore, you want to design your own conky so you take a template, analyse the code, copy&paste, google what you want to add and bam, completely customised conky that'll make your friends flush when they see it.

 

You'll want to use the command line to do that, have no fear, and then you'll encounter something, that takes a long time and you have to repeat... Automate it! Then you'll learn bash and down the rabbit-hole you go because then turning your script on manually isn't automatically enough anymore and you'll wanna try crontab. You notice that crontab is fine for you backup-routine (which you should do as a beginner), but it starts your scripts several times, so you turn to systemd.

 

And off you go.. You'll buy a raspberry pi, you create a NAS, install nextcloud, integrate its calendar with linux, get a plex-server with the flatpak app, want to convert all your videos to AV1, because it's awesome, and so on... Literally all you do more than 3-4 times will be automated 😄

 

It's hell of a lot of fun, but make a backup regularly; chances are you'll fuck it up here and there, and when you're desperate enough to want to learn awk, you can be considered an advances linux-user and return to this forum to help the other noobies.

 

P.S.: friend of mine with almost no IT-training landed a well paying job just because he's been using linux for the past decade and knew how it works.

I've definitely considered doing that but because I wanted my PC to work the first time when running Linux with a new CPU and everything I heard about debian being slow to update I just ended up going fedora workstation. I do kind of want to try ina VM though to do Fedora from server to customized but for now I think as a beginner I feel the many youtube videos are both a n incredibly useful thing but also kind of a curse. I ended up breaking some gnome stuff like the gnome terminal and nautilus in trying to install nix as an alternative to dnf.

Do you have some recommendations for smoother transition stuff? Since I know I'll be relying on YouTube for setting up a Windows VM to be able to either use my GTX 1070 or a RX 6700XT that I'm about to get and I want to do passthrough which I can't imagine I'll figure out myself.

I will say I still don't know if I properly got backups working on my current machine and am a bit scared to try is there a recommendation for a backup software as well as how to send a backup from the machine to a NAS?

Link to comment
Share on other sites

Link to post
Share on other sites

Having to set up a Windows VM for gaming is imho kind of a thing of the past. Nowaday, almost everything runs on linux and not rarely better, because it uses less resources. The only thing I've never gotten to work is WC3:Reforged, which I can live with, and every single game else runs perfectly.

 

backing up is pretty easy. If you have your NAS mounted already it goes like this:

 

sudo dd if=/your/drive of=/your/path

you can get /your/drive by looking it up on typing lsblk or by folder and even directly like this:

sudo dd if="$(df /mounted/folder | awk 'END{print $1}')" of=/your/path

you can also change speed, compress it on the fly and so on. Here's a complete example:

sudo dd bs=64M status=progress if="$(df /mounted/folder | awk 'END{print $1}')" | 7z a -mx=9 -mmt0 -si /path/to/your/backup.7z

I attached my personal backup script if that helps

backup

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, Arokan said:

Having to set up a Windows VM for gaming is imho kind of a thing of the past. Nowaday, almost everything runs on linux and not rarely better, because it uses less resources. The only thing I've never gotten to work is WC3:Reforged, which I can live with, and every single game else runs perfectly

A big part of why I want the Windows VM is less for necessity and more to allow for there to be a clear seperation of this is the workspace for gaming and this is the workspace for trying to code and do other projects. Creating an invisible barrier. If there's an easy way to do that on Fedora itself either in Gnome, KDE or some other Desktop Environment I'd definitely be willing to try it but that's the main reason for planning to do the Windows VM. Especially since in a short test I found that one of the main games I played on my old machine won't work with a VM all together since Riot Games hates Linux I guess. So have to rely on my windows tablet instead.

Link to comment
Share on other sites

Link to post
Share on other sites

Wanted to give you all an update, so far it's been almost a month of learning linux and I have now successfully tried Arch which is an advanced distro to some degree, i'm learning a lot. I'm also learning and applying the advice you guys are giving me on the fourm. I appreciate it! I didn't know this would be popular but I guess there are a lot more users who are in a similar boat as mine. 

Thank you guys again for taking the time to respond to my thread, I appreciate you all.

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/11/2022 at 4:45 PM, Timpster said:

Well, most of that is way over my head, even just the head | tail stuff, but I do understand tail -f.  Never used ANY of what you've mentioned here, but it's still interesting all the things human beings create for this system.

 

Edit:  I did start using the tail command for pi-hole.  That's extremely fun to me.  I used to fire up firefox, wait for that to load, go directly to the pi-hole query log page, wait for that to load, and it's a static page, so I have to refresh it.  Tailing it is so much faster it's really enjoyable to see it in real-time updates.

 

Regarding losing commands, WOW is that infuriating.  Going from TTY1 to a terminal app, and nothing transfers over, so you have to go back, somehow write it down or save it in a file, go back to the desktop, yes.  Experienced that countless times, very annoying.  Even in a VM, and rebooting, sometimes it doesn't always save.  And yeah, I've lost a lot of commands this way, virtual or not.  But to me it takes too much energy and thought to script or fix these things, and I'd just rather do them manually if I really need the command.

 

I can tell you're well past my understanding of the system, and I've been using it on and off since 2007!

well give it a couple years 😛  ive started using linux in 2003 (redhat 8.0 Psyche)

using head|tail is pretty simple , head displays lines starting from the top of the file , tail from the bottom, :

image.png.458deea512fee456cefbacb9cac492d1.png

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/14/2022 at 9:49 AM, Arokan said:

Having to set up a Windows VM for gaming is imho kind of a thing of the past. Nowaday, almost everything runs on linux and not rarely better, because it uses less resources. The only thing I've never gotten to work is WC3:Reforged, which I can live with, and every single game else runs perfectly.

 

backing up is pretty easy. If you have your NAS mounted already it goes like this:

 

sudo dd if=/your/drive of=/your/path

you can get /your/drive by looking it up on typing lsblk or by folder and even directly like this:

sudo dd if="$(df /mounted/folder | awk 'END{print $1}')" of=/your/path

you can also change speed, compress it on the fly and so on. Here's a complete example:

sudo dd bs=64M status=progress if="$(df /mounted/folder | awk 'END{print $1}')" | 7z a -mx=9 -mmt0 -si /path/to/your/backup.7z

I attached my personal backup script if that helps

backup 3.52 kB · 0 downloads

I've posted some scripts in another topic pertaining this i think , you might like them

On 12/10/2022 at 11:33 AM, Herr.Hoefkens said:

First script (oneliner):

makes use of dialog to show progress and , uses pv (pipeview and dd)

(pv -n $1 | dd of=$2  bs=16M conv=notrunc,noerror) 2>&1 | dialog --gauge "Cloning $1 to $2 ..." 10 70 0

second one , just terminal but it does calculate somewhat acurate  ETA and progress (unlike dd's native progress reporting)

#!/usr/bin/env bash
SIZE1=$(lsblk -bdno SIZE $1 2>/dev/null)
SIZE2=$(lsblk -bdno SIZE $2 2>/dev/null)
[[ -z "$SIZE1"  ]]  && SIZE="$SIZE2"
[[ -n "$SIZE1"  ]]  && SIZE="$SIZE1"
pv -per -s $SIZE $1 | dd of=$2 bs=16M conv=notrunc,noerror

screen is from a prev iter of the script:

image.png.9af29d1fa79c26c2a6cbe343ab5a56db.png

both scripts tend to solve the main problem with dd, not giving progress information that is usefull, (or nothing for a verry long time),

the screenshot is a bit misleading as it only pprints the progress on one line (but its a  screenshot made  from a asciinema replay)

dd gives progress with status=progresss but its only the current speed , not the total size not the eta , not the % completed, , using it in combination with pv (pipeview) and some basic scriping to look up the size of the source your trying to dd, and have pv compare that with the amount of data that has passed trough it together with the speed of the data that passes trought it , can give you  nice progressbar with eta,

the first script should give smth similar to this:

dialog | Random Engineering

as far as not losing commands go really check out:

BASHHUB

installing it is simple:

curl -OL https://bashhub.com/setup && $SHELL setup

it wil ask for creating an account and choosing a password (all just n shell) and a name for the system (as you can sync multiple systems)

after that

after a restart of the shell (close the pogram and reopen or just open a new tab, or...)

source ~/.bashrc

wil also make bashhub work and how to use it :

bh --help
bashhub --help

first command (bh) is the actual search and history command

bh -n 9999
bh 'cat fstab'
bh -n 500 cat
bh -i

fist wil list the last 9999 commands

second will search for any commands that have cat and fstab in them

third wil list the last 500 commands that have cat in them

last is interactive, allows you to browse the command history with arrows and select one to run

 

 

some other this that might be worth while:

$_ : the arguments from the last command that was executed
cd - : go back to the prev directory (you can also make use of pushd/popd ofc)
$( ls ) : runs a subshell (with ls in this case) and stores the output in a var
$(( 5+5 )) : same but for math , (stores the solution oof 5+5 ) in a var
	the math can be pretty advanced but for the complicated stuff your prolly better of using BasicCalculator (bc):
    echo 2^17|bc
a && b  :  AND , but as if only a is successfull do b  (most used as wait untill a finishes to do b
& : run the command before it as a background task

ps i myself use kde, (did the whole DM hopping thing in 2005 or so , (you can see a screenshot of me running kahakai (wich i actually liked) on my profile. i really hate GTK with a passion and then the gnome team did the gnome3 thing ... so that was a clear sign 🙂 but i like Qt and i really like programming with it (compared to gtk) , so i use konsole (with tmux) by default as a terminal (its a nice one no complaints) but for some tasks i have Terminology installed , nothing beats not having to grab the mouse to check images or clips (as that is hard smtimes to judge is this the one im looking for):image.thumb.png.d6cac8d5825df8544b9ab2abb3d7c783.png

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Herr.Hoefkens said:

ps i myself use kde, (did the whole DM hopping thing in 2005 or so , (you can see a screenshot of me running kahakai (wich i actually liked) on my profile. i really hate GTK with a passion and then the gnome team did the gnome3 thing ... so that was a clear sign 🙂 but i like Qt and i really like programming with it (compared to gtk) , so i use konsole (with tmux) by default as a terminal (its a nice one no complaints) but for some tasks i have Terminology installed , nothing beats not having to grab the mouse to check images or clips (as that is hard smtimes to judge is this the one im looking for):image.thumb.png.d6cac8d5825df8544b9ab2abb3d7c783.png

 

I must say as a relatively new user to Linux I feel conflicted because I really dislike the naming conventions of the KDE apps and like the simple style and straight forward names of the GTK stuff even though I really don't know if I necessarily like gnome overall and am kind of confused by what the workflow is that it is aimed at.

Link to comment
Share on other sites

Link to post
Share on other sites

i dont actually think there is a naming convention in kde... historically they looked for ways to include a 'K' in it either as an extra letter or by changing a Q or a C to a K

but gnome did pretty much the same thing , but they added a G (gedit, Gparted, gphoto eog) or otherwise tacking gnome onto it as in gnome-terminal ... and some names have no reference at all likee nautilus , totem , epiphany,..)

kde does the same : kwrite , digiKam,Karbon,Kate,kfind,konsole,Kleopatra,konqueror, krusader... otheres have kde tacked onto it like kdeconnect,kdenlive... and some have no reference at all: dolphin,...

its more how opensource community works i guess if you make an app for kde and you can put a K in it kind of shows that your app is intended for that DE...

it might be harder for Kde to stick to a single scheme , even if its not enforced , since the number of official applications maintained by the KDE theme far outnumbers the number that falls under the gnome umbrella , not to mention the insane amount of unoficial apps that ar intended for the de...

 

the main reason i like kde is because the devs dont pretend to know what is best for me... if you run gnome on a big 2 or 3 screen setup you realy facepalm yourself right trough your brains as far as usefull use of screenestate goes , it fits about the same amount of stuff on a 640x320 monitor as it does on an 8k monitor, not to mention it gives up any hope to reclame the infinite size buttons screen corners provide by imitating the idiocy  of apple's top bar. on any tought trough de (even windows) wanna close a window with the mouse:

throw your mouse up and right , and jst click you cant miss, on gnome and apple , you have to aim as the close button is nowhere near the corner

 

and i dunno the status and options provided by the gnome settings application but last time it was nowhere near what kde's system settings provides... and i really like the [Apply] button to commit changes , instead of instant change with any change 🙂 image.thumb.png.233ea91161ac8281d4f9662da6abb9ec.pngimage.thumb.png.93c6a563b67eba4ba5f6ba39c5223a3d.png

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Herr.Hoefkens said:

the main reason i like kde is because the devs dont pretend to know what is best for me... if you run gnome on a big 2 or 3 screen setup you realy facepalm yourself right trough your brains as far as usefull use of screenestate goes , it fits about the same amount of stuff on a 640x320 monitor as it does on an 8k monitor, not to mention it gives up any hope to reclame the infinite size buttons screen corners provide by imitating the idiocy  of apple's top bar. on any tought trough de (even windows) wanna close a window with the mouse:

throw your mouse up and right , and jst click you cant miss, on gnome and apple , you have to aim as the close button is nowhere near the corner

 

and i dunno the status and options provided by the gnome settings application but last time it was nowhere near what kde's system settings provides... and i really like the [Apply] button to commit changes , instead of instant change with any change 🙂

I will say that I definitely have some mixed feelings as it feels that the creation of windows connecting together is difficult on gnome, but I don't know if it's just not being experienced or using an extension.

I will say one complaint that I think I kind of have with every desktop OS I've tried so far is the difficulty in setting up a workspace/virtual monitor that will have a specific background or even ideally accessible apps. If there was something like that, I probably would be less interested in Windows virtualization for a gaming machine idea. The focus modes are really a big aspect of what I like about iOS and would love to know about attempts at similar things for desktop devices.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×