Linux Flashcards
1
Q
mv
A
move a file or directory
2
Q
rv
A
remove a file or directory
3
Q
rmdir
A
remove a directory
4
Q
mkdir
A
make a new directory
5
Q
history
A
show command history
6
Q
What can you type if command unknown
A
–help
7
Q
How to view directory
A
ls -l or sudo ls -l /root
8
Q
Reset the password to the “root” account
A
sudo passwd root
9
Q
how do you add users
A
sudo useradd (fred)
10
Q
what does su do?
A
switch users
11
Q
what is sudo?
A
activate all abilities (root)
12
Q
how to change password on user account
A
su root
sudo passwd fred
13
Q
Create a new file with
A
sudo vi newfile
use : wq to save file
14
Q
move file example
A
sudo cp newfile /root
sudo mv newfile /root
15
Q
installing apache
A
sudo apt-get install apache2
sudo vi mypage.html