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.

38 points
  • 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.

permalink
report
reply
12 points

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.

permalink
report
parent
reply
6 points

I use fish abbreviations. Unlike bash/zsh aliases, they expand when you press space or enter. This way you see the original command every time you use the alias, and you can edit as well. This should lighten the concern you have a bit. Your concern is something that sysadmins keep in mind e.g. default vim bindings so you are always comfortable on any server. However for desktop use I don’t think leaving the speed and comfort on table is worth it. Most desktop users only use their own systems anyway.

permalink
report
parent
reply
4 points

It’s about building muscle memory as well though. You are right that many home-gamers will probably never be without their customizations though. But if you do re-installs, setup VMs, try new distros, etc. it’s beneficial.

Just my opinion though.

permalink
report
parent
reply
6 points

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

permalink
report
parent
reply
3 points

+1 for the Terminus + zellij + helix combo

permalink
report
parent
reply
1 point

How does zellij do copy and paste? That’s the only thing keeping me from diving into tmux (beyond using it as a persistent terminal).

permalink
report
parent
reply
3 points

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

permalink
report
parent
reply
1 point

Byobu provides good abstraction on tmux as well as screen. Allows you to choose keybindings from any of the two.

permalink
report
parent
reply
1 point

I really enjoy byobu, especially since it has nice colors and is a mature well supported project

permalink
report
parent
reply
0 points
  • terminal multiplexers are used instead of window managers

Well, there’s twin.

permalink
report
parent
reply
22 points

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

permalink
report
reply
6 points

Well yeah, but I want to know any tips on doing it effectively. If I just “don’t install a DE” I wouldn’t know where to go from there.

permalink
report
parent
reply
4 points

If I’m reading your post right, you basically want a fully functional system that is console only (no GUI), right? So when you go to install, just simply skip installing the desktop environment/window manager.

That, or you can set it up to where your system boots to the console, and you can activate the DE/WM if you want to (like startx for X11). Each environment is different, but I think it’s removing the line for starting the DE/WM from either systemctl or maybe a hook, I forget.

permalink
report
parent
reply
2 points

Yes, I know how to this. I think the way I’m saying it is confusing so let me explain. I know how to install a minimal system without a GUI, however I needed advice on the tools to be able to run this system effectively (i.e. tmux, byobu, and other things people have been mentioning).

permalink
report
parent
reply
1 point

With systemd, you set the default target to something other than a desktop environment.

permalink
report
parent
reply
12 points
*

I’ll just dump this here.

shell tools

https://github.com/rust-unofficial/awesome-rust https://zaiste.net/posts/shell-commands-rust/

alternatives

  • fd: simpler find
  • bat: nicer cat
  • lsd: ls with NerdFont icons
  • broot: smarter tree
  • ripgrep: better grep

GUI alternatives

Task Management:

  • dun: note-taking & task manager
  • cubby: encrypted note taking to cloud, with markdown
  • girok: TUI calendar

Services:

File Manager:

  • clifm: nice shell file manager with tagging
  • nnn: cli fm with split-view file preview
  • TUIFI Manager: cli fm with rendered images in 2D layout
  • xplr: hackable, minimal, TUI fm

Login Manager:

  • CDM: shell login manager with history
  • Qingy: directfb login manager

Others:

ease of use

  • edir: rename with text file
  • mdcat: Sophisticated Markdown rendering for the terminal
  • clipboard: shell clipboard manager & more
  • portal: cli file transfer agent between computers
  • croc: simple file transfer tool via local server, Android Appp too
  • transfer.sh: cli file sharing via cloud
  • detox: file name cleanup
  • ouch: simple de/compressor
  • mnamer: intelligent video renamer
  • gum: bells and whistles for shell scripters
  • pytermgui: bells and whistles for python scripters

specialist tools

  • erd: Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.
  • LiteCLI: A command-line client for SQLite databases that has auto-completion and syntax highlighting.
permalink
report
reply
1 point

Great list, thank you!

permalink
report
parent
reply
2 points

I’d like to add MPV. It’s a video player that works from the tty using a framebuffer. So if you run “mpv path/to/video/file” it will play the video! Just learn the keybinds first so you’re not stuck with it. In fact, that applies to all of the framebuffer programs.

permalink
report
parent
reply
1 point

Yes I’m familiar with mpv. I thought I needed to have xorg or a display server running for it to work, thanks!

permalink
report
parent
reply
10 points

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.

permalink
report
reply
6 points
*

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

Serious question.

permalink
report
parent
reply
11 points

vim is more then simple file editing.

  • netrw (interactive file manager)
  • copen/lopen (windows to connect, e.g. external programs)
  • :global, %s/, etc. which form text manipulation language (from editor ed, I guess)
  • args & argsdo (multi-file editing)
  • filetype (hooks for the user)
  • ctrl_X completion modes
  • motion (fluent & with jumplist to walk forward/backwardl
  • undotree (persisting, unlimited, timebased - on-demand)
  • macros (record and replay keypress)
  • romainl (awesome community member)

vim for one-time tasks at work. When people are proposing to script something, I open buffers, normalize the data and filter the results. I think in vim and I would very, very much recommend it, if you work with data or are a dev.

permalink
report
parent
reply
4 points

you guys convinced me. I check vim out for at least the weekend

permalink
report
parent
reply
5 points

vim has better default keybindings/commands that allow for less movement of your hands. Nowadays, in reasonably current versions of nano, that’s mostly it. The main difference is nano is somewhat usable but extremely inefficient unless you learn it, while vim forces you to learn it to get anything done at all, which also pushes people to spend a bit of time learning it in general.

If you’re sure of the numbers you’re using, vim’s ability to repeat commands is also helpful. In practice I find that it’s really hard to make use of them beyond low numbers, where nano can still achieve things in similar amounts of keypresses. Eg something to delete 3 words like <escape>3dwi can be done similar with a sequence like Alt-A ^→ ^→ ^→ ^K in nano. Make it 20 words and nano is going to be a lot slower, but that’s quite an uncommon action.

But the practice is that nano users don’t spend time learning any of that and just hold delete until the words are gone, which takes forever. Everyone that can do basics in vim quickly learns that you can dw words away and make it 3dw to delete 3 of them. The default, easiest to use & access tool for any given situation gets blamed not just for its flaws, but also for the users that don’t want to spend time learning any tool.

permalink
report
parent
reply
3 points
*

After reading up on vim, I ended up at emacs now and I like the emacs style because it works with ctrl and meta keys which feels familar to me. I may learn emacs now.

Your example makes completely sense, yet I’ve never felt that the standard way was slow in the first place. I could see my workflow improving, but I guess I just want to have extra special commands. Thank you!

permalink
report
parent
reply
1 point

I agree that vim forces you to learn before you can use it, but it is possible to learn the bare minimum of vim.

I get by with a very basic understanding of insert mode and the other mode where :q! quits

permalink
report
parent
reply
4 points

VIM for the win. I really enjoy the built in file browser accessed by the command :explore

I also code in go frequently and go-fmt and go-lint etc work flawlessly. You can use whatever LSP you want so you get your code tips and autosuggestion etc.

The tabs and split window functions are nice too. Plus if you learn Vi well it’s on almost every system in existence. Nano not so much

permalink
report
parent
reply
2 points

I had my first training sessions and edited some prose. I’m excited how it’ll be with code.

permalink
report
parent
reply
3 points

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.

permalink
report
parent
reply
1 point

If I understand you correctly, I can write more efficiently because I can move to the next paragraph or sentence which I can’t with normal keybindings. Or special commands where I delete everything within “”. I understand the appeal of special moves but why not simply creating a Ctrl, Meta or alt command for that?

permalink
report
parent
reply
2 points
*

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

permalink
report
parent
reply
2 points
*

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.

permalink
report
parent
reply
2 points
*

That is some very useful commands, thx! But I don’t think I’ll be using it often and hence I’ll lose the skill. I know ctrl+vxs or f etc because I use them very often. Anything that I don’t use is forgotten even if I’d use vim

permalink
report
parent
reply
1 point

why use big app when nano does trick?

permalink
report
parent
reply
3 points

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

permalink
report
parent
reply
1 point

The most important thing about terminal multiplexers is that you have to atart them with the terminal command. e.g. yourterminal --startcommand=tmux.

permalink
report
parent
reply
8 points

Get the server version of whatever your favorite distro is. Nothing but terminal.

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

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

Community stats

  • 7.9K

    Monthly active users

  • 6.3K

    Posts

  • 175K

    Comments