I spend a lot of time on the terminal. I started with vanilla terminals on Ubuntu and macOS. Later I learned about terminals with a few "batteries" included like iTerm2 and HyperJS. I have also used tmux extensively before, but ended up switching a few months later to use window splitting from iTerm2 and also profiles, which can login to a shell session automatically. Well, enough of history.
This post will introduce you to a basic shell configuration....
Archiving and compressing are two different concepts. Archiving is basically collecting files in a single package and a popular tool for that is called tar. Compressing is actually reducing file size by means of an algorithm and popular ones include bzip2 and gzip. I will talk about those, but first I would like to talk about another tool for creating archives: cpio.
cpio The cpio command can be used to create a backup of the /home/ directory for instance:...
This post is a collection of commands basically, I hope it works a reference for me and other people who pass by.
To delete users, we have deluser and userdel. For me, it was really weird learning that we have two commands with similar names that basically do the same thing. I present some examples below.
# removes user and home directory $ deluser -r user $ userdel user # remover user from group $ deluser user group # deleting a group $ deluser --group group Creating or deleting groups, adding a user to them or changing primary group:...
When a system administrator wants see when a user last changed a password or wants to force a user to change it, there is a really nice command to come to the rescue: chage. I created a user called aluno and I started to check for its information:
$ sudo chage -l aluno Last password change : Sep 16, 2016 Password expires : never Password inactive : never Account expires : never Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7 As we see, the user password was last changed on Sep 16, 2016 and it never expires nor gets inactive....