Linux Command Line Practice Exam
Question 1 of 50
chmod
chmod 755 file
chmod u+x file
env
export VAR=value
#!/bin/bash
chmod +x script.sh
./script.sh
cd
cd /path
cd ..
cd ~
history
!n
!!
find /path -name "*pattern*"
-type f
-type d
tar
unzip file.zip
zip archive.zip files
&
sleep 10 &
jobs
fg
bg
rm file
rm -r dir
-f
tar -cvf archive.tar dir
tar -xvf archive.tar
-z
head filename
-n 5
grep pattern file
-i
-r
chown
mv source destination
chown user:group file
nano
nano file
ln -s target linkname
ln target linkname
locate
which command
locate filename
updatedb
|
ls | grep txt
less filename
cat
alias ll='ls -l'
~/.bashrc
source ~/.bashrc
tail
mkdir directory_name
mkdir -p /path/to/nested/dir
tail filename
wget URL
-O file
/home/username
ping host
-c 4
yum
dnf
ls
-l
-a
-h
yum install package
dnf install package
yum update
pwd
rwxr-xr-x
ls -l
ps aux
top
htop
ifconfig
ip addr
which
apt
ps
kill PID
kill -9 PID
sudo apt install package
apt remove
apt autoremove
> file
>> file
ls > list.txt
gzip file
gunzip file.gz
curl URL
-O
curl -X POST data
cat filename
| less
crontab -e
* * * * * command
free -h
uptime
vmstat
cp source destination
less
wget
Ctrl+Alt+T
gzip
apt update
apt upgrade
command --help
man command
ssh user@host
-p port
rm
df -h
du -sh dir
grep
cp
ssh
command < file
sort < names.txt
touch filename
.zip
curl
Question navigator