Linux Commands Flashcards
what is the kill command?
kill / stops proccess
kill processID
kills the process listed
what does the command shutdown do?
shuts down the computer with a 1 minute timer.
shutdown - c
cancel shutdown
shutdown -r
shutdown computer and reboot
shutdown now
shutdown right now with no timer
apt-get
opens the apt repository
sudo apt-get update
update apt-get
sudo apt-get sudo install programname
install a program
sudo apt-get upgrade
how to upgrade all of the apps
sudo apt-get remove programname
how do you remove a program
ps
processes
ps aux
shows all processes with details for all users
chmod
change permissions
what order are file permissions listed?
user
group
other
what numbers are assigned to each of the types of permissions?
- r=4
- w=2
- x=1
chmod 664 user
change file permissions rw user rw group r other for user
chown
change ownership
sudo chown timmy fred
change ownership from timmy to fred
passwd
change password
what 3 steps would you use to change a password?
- be logged into the account of the user whose password you want to change
- sudo passwd
- enter new password
dd
bit by bit copy command
dd if=/dev/sda of=/dev/sdb
copy everything from (source)=partition/device name (to) partition/device name
dd if=/dev/sda2 of=~/backup.img
make a backup / image file
dd if=/dev/zero of=/dev/sdb
just write zeros’s to this destination completely 0’s
rm filename.ext
remove file
rm *
remove everything
cp
copy
mv
move
copy m* path
copy everything starting with m to path folder
mkdir_name
make folder
rmdir name
remove folder
Linux equivalent to PowerShell
Bash Shell
sudo
run admin
ls
directory
su
superuser 1 time use
how you delineate switches in Linux
-
man
manual command = help
q
quit
cd ~
home directory
pwd
tells you the current directory
tab
autocompletes