Linux SHELL Guide
Shows all hidden files and folders along with normal ones.
|
|
list lot of information about non-hidden files and directories
|
|
list above info for hidden files and directories too
|
|
to switch to a dir same as cd but it just saves the path from which you came
|
|
to switch back to dir from which you came with pushd
.
|
|
tells details of file
|
|
search a directory or a file in data base
|
|
or
|
|
NOTE: run before locate/mlocate to update database
|
|
see calander
|
|
see if command is installed or not, returns path of the command
|
|
brief one-line discription of what a command can do
|
|
shows the commands related to or contain given keyword
|
|
equivalent to apropos but show information in readable format
|
|
copy a files and directories
|
|
move files and directories
|
|
delete/remove files
|
|
delete/remove directories
|
|
create a text file.
|
|
NOTE: use printf for format the text
show the content of a text file on terminal
|
|
write into the text file
|
|
copy file1 to file2
|
|
- “>” operator will overwrite the existing data
- “»” operator will append data
bash text editor for editing files in CLI format. there are others too
|
|
switch to root user or root account, to exit type exit
|
|
switch to another user account, to exit type exit
|
|
move to root user account
|
|
see how many accounts are logged in
|
|
executable permission to file for everyone
|
|
get the PID of programme and all its instances
|
|
see the running process
|
|
kill process by their name
|
|
kill process by their PID
|
|
get the snapshot of top (Best)
|
|
find the exact package
|
|
Install .deb files
|
|
sudo apt-get install -f
apt-cache showpkg/show package-name
apt-cache depends package-name
see package info
|
|
create and edit cronjobs (scheduled server tasks)
|
|
see cronjobs on terminal
|
|
create a SCREEN session with name
|
|
see detached and running screen session
|
|
reattach to detached screen session
|
|
see cronjobs-logs with
|
|
install/extract tar files
|
|
Find Public IPv4 address
|
|
Fix bluetooth in ubuntu>18.04
|
|
Instll/Add PPA repository
sudo add-apt-repository ppa:dr-akulavich/lighttable
// adds repository link to /etc/apt/source.list
|
|
sudo apt-get install lighttable-installer
// installing the software
Remove PPA repository and link
Use the above script to see the list of installed PPAs
now remove the ppa
|
|
Check mounted/connected disks to the system
|
|
Command for burning USB {notice the of and if carefully}
|
|
Set-up ssh key for connecting to git
eval
ssh-agent``
|
|
https://stackoverflow.com/questions/10508843/what-is-dev-null-21
Pacman, AUR
List dependency of a package
|
|
See locally installed packages~ AUR(s) or installed with AUR helpers.
|
|
To list all the Fonts installed in your system
|
|
How to add users in arch Linux
- do
adduser NAME
oruseradd NAME
whichever is present in your system. - then set password for
NAME
withpasswd NAME
-
Give
sudo
privileges toNAME
To give sudo rights to a user you can add him to group
wheel
. Wheel is group for users who want every system administrator privileges. you can add a user to groupwheel
withgpasswd -a NAME wheel
, notice to give users of wheel group root privileges in/etc/sudoers
(always edit/etc/sudoers
withsudo visudo
to avoid Error(s) ) file otherwise even if you add users to wheel group they will not be able to use sudo. add this line%wheel ALL=(ALL) ALL
for wheel group users in/etc/sudoers.
Or you can custom give a user root privilages like by adding this line
USER_NAME ALL=(ALL) ALL
to/etc/sudoers
if you choose to do this then you don’t need to addNAME
towheel
group.but the first approach is recommended.