Keyboard Shortcuts Commands
Keyboard Shortcuts | Description |
---|---|
Ctrl + K | Cut and add to the clipboard part of the line after the cursor |
Ctrl + U | Cut and add to the clipboard part of the line before the cursor. |
Ctrl + W | Cut and add to the clipboard one word before the cursor was. |
Ctrl + C | Kill process running in the terminal. |
Ctrl + Z | Stop the current process.
|
Ctrl + R | Recall the last command that matches the provided characters. |
Ctrl + O | Run the previously recalled command. |
Ctrl + G | Exit command history without running a command. |
Ctrl + Y | Paste from clipboard. |
Users
Useradd
useradd
This command creates a new user.
sudo useradd [options] username
Common Options:
-m
: Create the user’s home directory if it doesn’t exist.-d
: Specify a custom home directory.-G
: Add user to one or more groups.-s
: Specify the login shell.-c
: Add a comment (e.g., user’s full name).
Userdel
userdel
This command deletes a user.
sudo userdel [options] username
Common Options:
-f
: Delete Linux user account with force removal of files-r
: Remove Linux user account including home directory and mail spool
Usermod
usermod
This command modifies a user.
sudo usermod [options] ___ username
Common Options:
-e
: To change the expiry date of a user-d
: To change the home directory of a user-g
: To change the group of a user-l
: To change user login name-c
: To add a comment for a user-L
: To lock a user-U
: To unlock a user-s
: To create a shell for the user
Groups
Groupadd
groupadd
This command creates a new group.
sudo groupadd [options] groupname
Common Options:
-g
: This parameter is used to specify the numerical ID for the group.-c
: create a group with attached comment
Groupdel
groupdel
This command deletes a group.
sudo groupdel [options] groupname
Common Options:
-f
: Delete Linux user account with force removal of files-r
: Remove Linux user account including home directory and mail spool
Groupmod
groupmod
This command modifies a group.
sudo groupmod [options] ___ groupname
Common Options:
-g
: Changes the group ID-n
: Changes the name of the group-U
: Lists members of a group-o
: Allows using duplicate group ID
A little of everything
COMMANDS | Description |
---|---|
man ___ | It is a manual for near every command |
ls | List directory contents |
cd | To change directories |
whatis ___ | Shows the section “name” in man command |
whoami | Shows in which account you are |
clear | “Deletes” all the commands of the screen |
echo ___ | Prints text to the screen |
history | Shows to you the commands that you have entered previously |
mkdir ___ | Create a new directory |
COMMANDS | Description |
---|---|
date | Shows the date that have configured |
reboot | Restarts the systems |
apt update | Updates the packages |
apt upgrade | Updates the installed packages |
apt install ___ | Installs a package |
apt remove ___ | Removes a package |
cp ___ ___ | Copies the file or directory |
rm ___ | Removes a file |
chmod ___ ___ | To change the file permissions |