Basic Linux Commands Flashcards
List directory contents
ls - List files, directories, for long output do ls -l | more
Find text in a file
grep PATTERN [FILE]
Change current directory
cd - identical to windows, forward slashes instead of backwards /var/log
Shut down the system
shutdown, sudo shutdown 2 -r reboot cntrl c to cancel
Print Working Directory
pwd - displays the current working directory path
Change a user account password
passwd [username]
Move (rename) a file
mv SOURCE DEST
Copy a file
cp SOURCE DEST
Remove files or directories
rm - Does not remove directories by default, Directories must be empty or must be removed with -r
Make a directory
mkdir DIRECTORY
Change mode of a file system object
chmod - r,w,x, can also use octal notation, file owner u, group g, others o, all a
Change file owner and group
chown - sudo chown [OWNER:GROUP:] file
View or change wireless network configuration
iwconfig - requires knowledge of the wireless network - iwconfig eth0 essid studio-wireless
View or configure an interface and IP configuration
ifconfig eth0
View the current process
ps - Similar to the windows task manager -e all