1/99
I don't own anything, I just reupload and need to do this for my studies. Original is here: https://quizlet.com/307593269/linux-commands-flash-cards/
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
pwd
print working directory
su
Switch User
~
Shows Home Directory
$
Level of Access- typical user?
exit
" "
Ctr + Alt F1-F12
switch sessions
ls
list
-l
long list
{tab}
auto complete
{up arrow}
previous commands
/usr
information on a directory
date
date and time information
echo $ (date)
date and time information
cal
calendar
clear
clear command script
cal (month) (year) i.e. -cal 06 15
calendar for entire 2015 year/alternate times
uptime
shows how long system has been up- Shows users and load on the OS
who
where connections are coming from with different users- also the IP addresses of different users
whoami
current user- who is logged on
hostname (new name)
local machine being used (can change host cpu name) if used alone "host name" changes it back to default system name
w
shows who is logged in, time they have been in a session
last
record of users and what the system has done, with times too
echo
repeats back, whatever is held in the variable following it
sleep (time) i.e. sleep 5
puts the system to sleep for 5 seconds or any other time.
cd
change directory
sudo (super user do)
temporary elevates privileges
cat
shows what is in a file
which cat
where is the cat command located
/bn/ i.e. cd /bn/
bin directory is location of many commands
man (any search term) i.e. man clear
shows possible commands and definitions of search commands
q
quit
-a i.e. ls touch-a
show all
mv
move
apropos (search term) i.e. apropos network
Another way to search general terms related to commands
info i.e. info ls
further information on commands and what they do (was meant to replace the man pages)
/etc/init.d/
shows what is running (background processes)?
service (application) i.e. service cups
shows status of background processes
stop i.e. sudo service cups stop
stop an application (may ask for creds)
status i.e. ./cups status
shows status of an application
cat /etc/initab
read the content in the file initab
sudo telinit 3
switched to a run level 3 in the intab file (command is specific to red hat machines)
pstree
process tree-shows what processes are responsible for others
enter
give space to type new commands, prevents clutter
shutdown i.e. sudo shutdown -r now
shutdown system
-r
restart
-h
halt
poweroff
power down the machine
runlevel
see current run level
telinit (1-5)
Change run level
useradd (name)
adds user
cat /etc/passwd
shows all different user accounts
passwd (user name)
creates a password for a user
useradd -D
shows where users are assigned and other stats
ls /home
shows all user names
/(search letter)
can use to search through directories
usermod
Modify a user
cat /etc/shadow
Information (Encrypted) on users, only available to root users. Use for Admin to edit stuff
groupadd (name of group)
create a group
usermod -G (list name of group) (name of user)
Add user to group
groups (user name)
See where a particular user is group wise
cd /etc/profile.d/
can be used to edit user accounts
userdel i.e. userdel -r Stacie
delete user account/erase files
groupmod
modify group
groupdel
delete a groupgrouphost
tail /etc/group
check on users and groups
gedit (file name)
able to edit individual files in gedit
env | less
observe settings of users desktop?
shift + :
Bring up the command line to escape
usermod -l
lock an account
ctr+alt+F7
takes back to desktop window
/dev/hda1
LESSON 3 Start
e2label /dev/(device name)(partition number) (label name)
label a file system
fdisk (options) (device name) -b, -h, -S, -s, -v, -l, These are used inside the file: n, d, p, w, q,
show options for hard drives/ alter hard disks
mkfs -v,-V, -t, fs-options,-c,-l
make file system on a hard drive
mke2fs -b,-c,-f,-j,-M,-V
create ext2,3,4 filesystems
mkdir i.e. mkdir /morning
make directory
ctrl+c
Get out of the directory
parted
get into the GNU parted utility
mount i.e. mount LABEL=Mrng /morning
mount a HD
shows partition label
/boot
directories for startup
/bin
command line utilities
/dev
device drivers
/etc
basic configuration
/lib
shared programs libraries
/sbin
stores binaries
/usr
small programs
/var
store system logs, printer spools
/tmp
temp files
/opt
file and larger software packages
/mnt
mount point for temp media like cd roms
/media
allows access to removable media
cd i.e. cd /home
change directory
ls
list
mv
move
cp
copy
rm
rename
rmdir
delete directory
pushd
add a directory on top of the stack
mount options: auto, noauto, nouser, user, exec, noexec, ro, rw, sync, async
different options for mounting