this post was submitted on 11 Jul 2024
55 points (95.1% liked)

Linux

50337 readers
869 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I wanted to have a separate laptop where I only use the terminal for my use cases. At the moment I am somewhat confident using the terminal, but I think limiting myself to tty only would build my confidence even more. Any tips?

EDIT: I am already using nvim and I already have installed a minimal distro (Arch). I just need advice on how to actually run this system effectively.

(page 2) 22 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 7 months ago (1 children)

Like others said, you can try installing Arch manually (not with the install script). You get the hang of the terminal and you get to see a bit more of how Linux works under the hood. The wiki is your friend, spend some time reading it!

[–] [email protected] 1 points 7 months ago (1 children)

I actually am using a manual Arch install. What i meant by gaining confidence is completely abandoning xorg and using the tty only.

[–] [email protected] 9 points 7 months ago (2 children)

Look into terminal multiplexers like screen or tmux, they are a sort of "window" system for tty.

There are text-only browsers but I'm not sure they'll be usable on today's websites. May want to set your tty to a graphical mode (framebuffer) and use a mixed-mode browser that can render images and some other stuff.

load more comments (2 replies)
[–] [email protected] 4 points 7 months ago* (last edited 7 months ago) (2 children)

Almost every CLI only version of Linux is designed to be a server.

Servers assume you have no WiFi. There will not be an option to set it up during first-time setup, you will have to do it manually.

You are doing this on a laptop which generally assumes you will be using WiFi.

You will have to set up wpa_supplicant during install via command line outside of the automated setup.

Further, if your WiFi drivers have any non-free proprietary code in them, you will need to manually install drivers for them like you would normally. Once again, best to do during setup, if possible.

If you have the option of connecting directly with ethernet during setup, you can sort of wiggle past it and set it up after, but I've personally found that the servers prefer it if you do it during setup (ie. fewer weird networking issues).

As others have said, you could also just not install a desktop environment in a normal version of Linux instead of going for a server version, as another way to avoid this issue.

Source: personal experience using server version of Linux on laptop

load more comments (2 replies)
[–] [email protected] 38 points 7 months ago (4 children)
  • set a good tty font (it's almost all you're gonna see)
  • be comfy with basic core utils (mv, cp, chmod, ...)
  • choose a shell (bash, fish, ...) and set up some useful aliases/abbreviations
  • fzf or something similar does wonders (also replaces things like dmenu)
  • terminal multiplexers are used instead of window managers
  • some applications allow you to do some graphics (like mpv to play video)
  • there is more advanced stuff you can do with frame buffers
  • there are terminal browsers like w3m or lynx
  • a good extensible text editor is essential (vim, nvim, emacs, helix, ...)
  • research some cli applications for your usecase (cal (calendar), neomutt (email), ...)

Over time your collection of aliases and scripts will grow to make common tasks you do easier.

[–] [email protected] 12 points 7 months ago (3 children)

I disagree on the aliases. I'd recommend using almost none. It builds competence with the commands on all systems even without your special .bashrc. It'll be easier to write scipts and change shells as well.

load more comments (3 replies)
[–] [email protected] 6 points 7 months ago (3 children)

Great list. Customizing the font is definitely a priority. I recommend one of the Terminus fonts. Also zellij multiplexer + helix editor is a great combo that works well in the tty.

One thing to add is that it took me a while to create a decent 16-color theme for helix and vim, and while they're okay by default you can actually get a pretty nice looking IDE if you spend some time tinkering with the colors

load more comments (3 replies)
[–] [email protected] 3 points 7 months ago (2 children)

Thanks a lot, I'll definitely try the terminal multiplexers you're talking about. I wondered how you would get different windows in tty.

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 5 points 7 months ago (1 children)

I read this thinking you meant you wanted to only use a serial terminal, which sounds like a really neat project: they're cool hardware and would certainly be a unique way to interact with modern computing.

But uh, yeah no that's probably not what you meant and I've spent WAY too much time dealing with retro stuff lately.

[–] [email protected] 2 points 7 months ago (1 children)

What are these serial terminals you're talking about?

[–] [email protected] 8 points 7 months ago

Back in the super early era of computers, they were stupidly expensive. One solution was to hook up a lot of people to a single computer via a computer terminal, which were much cheaper.

Basically it would allow you to deploy a ton of monitors and keyboards to access a single computer relatively cheaply, and UNIX was the OS that (mostly) was used for this.

You noticed that your console session is called 'TTY-a-number'. Well, TTY stands for 'teletypewriter' which was the very first incarnation of this, and was what was in use when the name of the console was a made, and it's just... never been changed, though tty devices and their later serial consoles are quite dead as far as tech goes.

Enabling a serial terminal in Linux is a one-line change, and you can then use any terminal emulator you'd want to connect over it, but eh, it's a pretty dead technology and nobody uses that at this point.

Since I seem to be dumping useless retro facts all over the place: you could do this with DOS, and Digital Research released Concurrent DOS to allow multi-tasking, multi-user access to a DOS system. If you wanted to fiddle with that in the modern era, you'd want the Novell Multiuser DOS rebrand, since it supports vt100 emulation and thus can be used with basically any serial terminal app unlike the previous versions which emulated specific HP and IBM serial terminals.

[–] [email protected] 5 points 7 months ago* (last edited 7 months ago)

If you haven't set up this laptop yet, then I'd suggest installing a server-oriented distro like Debian, AlmaLinux, or Ubuntu Server. Those have minimal install options that come without a desktop environment installed, as most servers do not need one. If you'd like to make the install harder for yourself, this might be a good excuse to give Arch Linux or Gentoo a try, as those have the option of a fully manual install. If you'd like, you can install a desktop environment afterwards using the package manager.

If you already have a Linux with a graphical desktop installed, you can configure the system not to automatically start it with sudo systemctl set-default multi-user.target. (Do not do this on your main device!) You can re-enable it with sudo systemctl set-default graphical.target.

Regardless, you can then start a graphical session using startx, or whatever command is more appropriate for your desktop environment (gnome-session to start GNOME on Wayland, startplasma-wayland to start KDE Plasma), or by sudo systemctl starting your login screen manager (sddm, gdm, lightdm, etc).

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago) (1 children)

Just go for it! It'll be fun. You will find yourself navigating your digital life (or at least: most of it) at relative ease with less distractions and graphical fuzz you otherwise get.

Getting to know terminal multiplexer (like screen) or vi-keys are crucial skills for anyone who is not afraid from working on "headless" machines!

[–] [email protected] 0 points 7 months ago

vi-keys are crucial skills

I can very seriously argue on this one.

[–] [email protected] 22 points 7 months ago (4 children)

Just don't install a DE? Am I missing something?

load more comments (4 replies)
[–] [email protected] 10 points 7 months ago (3 children)

If you're serious about sticking to the terminal, it's probably worth learning a terminal text editor like emacs or vim. Once you get the hang of them, you can be much more productive compared to something like nano.

I think it's also worth learning about job control and/or terminal multiplexers, but I've yet to fully understand them myself.

[–] [email protected] 6 points 7 months ago* (last edited 7 months ago) (12 children)

How can you be more productive in vim compared to nano?

Serious question.

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago)

Tbh I think it's just a matter of preference and some people are being elitist about it or overestimate the importance of it.

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago) (3 children)

Try running this: vimtutor

If you are already aware of hjkl, skip to the part where you learn motions:

/motion

Then look up surround (ysw is usually the command to surround a word, ys3w the next 3 words, etc)

It's pretty neat.

load more comments (3 replies)
[–] [email protected] 1 points 7 months ago

why use big app when nano does trick?

[–] [email protected] 3 points 7 months ago (4 children)

Easy. Just learn to use it and it is already there.

With nano, you work with that letter where your cursor is at the moment. This is convenient, but limited.

With vim, you can also work with a word, or the whole line, or part of the line, or a section, or the whole file (or many files if you use the shell extension) and it goes all with the same ease.

Vim also allows you to keep your hands in place on the letters on your keyboard all the time. No need to move the hands around, grabbing the mouse and back, or the arrow keys, and thus search for the correct position for your hand every few seconds - which costs time and focus.

load more comments (4 replies)
load more comments (8 replies)
[–] [email protected] 3 points 7 months ago

Julia Evans recently did a thing about job control here. Nothing yet on multiplexers though

load more comments (1 replies)
load more comments
view more: ‹ prev next ›