Debian Commands Flashcards
Where can you view a list of user groups
/etc/group
How do you add a user to an admin group
sudo usermod -aG [GROUP] [USER]
-a (append) is critical or will remove from other groups rather than just adding to a new
Find the current date
date
Find the current working directory
pwd
Current computer name
hostname
View directory contents Inc hidden files
ls -a
How do you sort results in reverse
sort -r
How do you output to a text file
(In to home directory for this example)
> ~/output.txt
How to output any potential errors only
(eg of command/script for error logging)
2> [path]
How you output to both screen and file
tee [output path]
Output and add to existing file
> > [path]
Refer to entire contents of current directory
./*
File permissions order
User, Group, Others
How do you find a binary’s location, manual and source
whereis [binary]
How do you find a binary in the PATH variable
which